diff options
author | Marcel Hellkamp <marc@gsites.de> | 2013-10-18 21:35:07 +0200 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2013-10-18 21:35:07 +0200 |
commit | 9459599a1ccf99408f521f44cce2a0454f799e83 (patch) | |
tree | f7548d3a53ce47ede231044d500bef4653765195 /test/test_environ.py | |
parent | 722172296bec0281be71e261bfb14fac7114c699 (diff) | |
download | bottle-9459599a1ccf99408f521f44cce2a0454f799e83.tar.gz |
Removed the ``BaseRequest.MAX_PARAMS`` limit.
The hash collision bug in CPythons dict() implementation was fixed over a year ago. If you are still using Python 2.5 in production, consider upgrading or at least make sure that you get security fixed from your distributor.
Diffstat (limited to 'test/test_environ.py')
-rwxr-xr-x | test/test_environ.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/test/test_environ.py b/test/test_environ.py index 5ad5b03..2bc29e3 100755 --- a/test/test_environ.py +++ b/test/test_environ.py @@ -392,27 +392,6 @@ class TestRequest(unittest.TestCase): del r.environ['HTTP_X_FORWARDED_FOR'] self.assertEqual(r.remote_addr, ips[1]) - def test_maxparam(self): - ips = ['1.2.3.4', '2.3.4.5', '3.4.5.6'] - e = {} - wsgiref.util.setup_testing_defaults(e) - e['wsgi.input'].write(tob('a=a&b=b&c=c')) - e['wsgi.input'].seek(0) - e['CONTENT_LENGTH'] = '11' - e['REQUEST_METHOD'] = "POST" - e['HTTP_COOKIE'] = 'a=1;b=1;c=1;d=1' - e['QUERY_STRING'] = 'a&b&c&d' - old_value = BaseRequest.MAX_PARAMS - r = BaseRequest(e) - try: - BaseRequest.MAX_PARAMS = 2 - self.assertRaises(HTTPError, lambda: r.query) - self.assertRaises(HTTPError, lambda: r.cookies) - self.assertRaises(HTTPError, lambda: r.forms) - self.assertRaises(HTTPError, lambda: r.params) - finally: - BaseRequest.MAX_PARAMS = old_value - def test_user_defined_attributes(self): for cls in (BaseRequest, LocalRequest): r = cls() |