diff options
| author | Tim Graham <timograham@gmail.com> | 2015-03-09 20:05:13 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-18 08:39:37 -0400 |
| commit | 2342693b31f740a422abf7267c53b4e7bc487c1b (patch) | |
| tree | 671ee7ae37806f22e653000b34ffb068b6824a1a /tests/regressiontests/utils/http.py | |
| parent | 3b20558beb6abef0b53f3c8e4ca6b598219f1d0d (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/utils/http.py')
| -rw-r--r-- | tests/regressiontests/utils/http.py | 4 |
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', |
