Author: justi9
Date: 2010-09-27 13:07:06 -0400 (Mon, 27 Sep 2010)
New Revision: 4349
Modified:
mgmt/newdata/wooly/python/wooly/__init__.py
Log:
Additional fix for bz 622506; better handling of malformed query strings
Modified: mgmt/newdata/wooly/python/wooly/__init__.py
===================================================================
--- mgmt/newdata/wooly/python/wooly/__init__.py 2010-09-27 15:27:39 UTC (rev 4348)
+++ mgmt/newdata/wooly/python/wooly/__init__.py 2010-09-27 17:07:06 UTC (rev 4349)
@@ -552,7 +552,11 @@
vars = query.split(";")
for var in sorted(vars):
- key, value = var.split("=")
+ try:
+ key, value = var.split("=")
+ except ValueError:
+ continue
+
writer.write(" %-30s %s\n" % (key, value))
writer.write("\n")
@@ -751,16 +755,17 @@
for var in vars:
try:
skey, svalue = var.split("=")
- key = unquote(skey)
- value = unquote_plus(svalue)
+ except ValueError:
+ continue
- param = self.page.get_page_parameter_by_path(key)
+ key = unquote(skey)
+ value = unquote_plus(svalue)
- if param:
- param.add(self, param.unmarshal(value), key)
- except ValueError:
- pass
+ param = self.page.get_page_parameter_by_path(key)
+ if param:
+ param.add(self, param.unmarshal(value), key)
+
def marshal_cookies(self):
"""
Produce a list of strings representing cookies newly set on
Show replies by date