Commit d3305d1e authored by Martijn Pieters's avatar Martijn Pieters

Fix for COllector #500 merged from 2.5 branch.

parent 169f1ab1
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.76 $'[11:-2] __version__='$Revision: 1.77 $'[11:-2]
import re, sys, os, urllib, time, random, cgi, codecs import re, sys, os, urllib, time, random, cgi, codecs
from BaseRequest import BaseRequest from BaseRequest import BaseRequest
...@@ -925,6 +925,7 @@ class HTTPRequest(BaseRequest): ...@@ -925,6 +925,7 @@ class HTTPRequest(BaseRequest):
k=key.split( ".") k=key.split( ".")
k,attr='.'.join(k[:-1]), k[-1] k,attr='.'.join(k[:-1]), k[-1]
a = attr a = attr
new = ''
# remove any type_names in the attr # remove any type_names in the attr
while not a=='': while not a=='':
a=a.split( ":") a=a.split( ":")
......
...@@ -554,6 +554,22 @@ class ProcessInputsTests(unittest.TestCase): ...@@ -554,6 +554,22 @@ class ProcessInputsTests(unittest.TestCase):
self.failIf('<' in e, self.failIf('<' in e,
'%s converter does not quote unsafe value!' % type) '%s converter does not quote unsafe value!' % type)
def testNameWithDotAsTuple(self):
# Collector #500
inputs = (
('name.:tuple', 'name with dot as tuple'),)
req = self._processInputs(inputs)
self._noFormValuesInOther(req)
formkeys = list(req.form.keys())
formkeys.sort()
self.assertEquals(formkeys, ['name.'])
self.assertEquals(req['name.'], ('name with dot as tuple',))
self._noTaintedValues(req)
self._onlyTaintedformHoldsTaintedStrings(req)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment