summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-03-09 20:05:13 -0400
committerTim Graham <timograham@gmail.com>2015-03-18 08:39:37 -0400
commit2342693b31f740a422abf7267c53b4e7bc487c1b (patch)
tree671ee7ae37806f22e653000b34ffb068b6824a1a /tests/regressiontests
parent3b20558beb6abef0b53f3c8e4ca6b598219f1d0d (diff)
[1.4.x] Made is_safe_url() reject URLs that start with control characters.
This is a security fix; disclosure to follow shortly.
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/utils/http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/regressiontests/utils/http.py b/tests/regressiontests/utils/http.py
index 3ec237ae64..8245a7e54e 100644
--- a/tests/regressiontests/utils/http.py
+++ b/tests/regressiontests/utils/http.py
@@ -98,7 +98,9 @@ class TestUtilsHttp(unittest.TestCase):
'http:\/example.com',
'http:/\example.com',
'javascript:alert("XSS")'
- '\njavascript:alert(x)'):
+ '\njavascript:alert(x)',
+ '\x08//example.com',
+ '\n'):
self.assertFalse(http.is_safe_url(bad_url, host='testserver'), "%s should be blocked" % bad_url)
for good_url in ('/view/?param=http://example.com',
'/view/?param=https://example.com',