[Python-checkins] r54914 - tracker/roundup-src/roundup/cgi/templating.py

erik.forsberg python-checkins at python.org
Sat Apr 21 18:56:05 CEST 2007


Author: erik.forsberg
Date: Sat Apr 21 18:56:04 2007
New Revision: 54914
Modified:
 tracker/roundup-src/roundup/cgi/templating.py
Log:
Work around http://psf.upfronthosting.co.za/roundup/meta/issue111 -
roundup not being fault-tolerant enough about multiple form values.
Modified: tracker/roundup-src/roundup/cgi/templating.py
==============================================================================
--- tracker/roundup-src/roundup/cgi/templating.py	(original)
+++ tracker/roundup-src/roundup/cgi/templating.py	Sat Apr 21 18:56:04 2007
@@ -2231,7 +2231,13 @@
 for name in ':search_text @search_text'.split():
 if self.form.has_key(name):
 self.special_char = name[0]
- self.search_text = self.form[name].value
+ try:
+ self.search_text = self.form[name].value
+ except AttributeError:
+ # http://psf.upfronthosting.co.za/roundup/meta/issue111
+ # Multiple search_text, probably some kind of spambot.
+ # Use first value.
+ self.search_text = self.form[name][0].value
 
 # pagination - size and start index
 # figure batch args


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /