diff options
| author | Tim Graham <timograham@gmail.com> | 2014-12-03 16:14:00 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-13 13:10:11 -0500 |
| commit | 72e0b033662faa11bb7f516f18a132728aa0ae28 (patch) | |
| tree | 806b30510d82ff124c62dbe9c934e7a31e01e1d6 /tests | |
| parent | d7597b31d5c03106eeba4be14a33b32a5e25f4ee (diff) | |
[1.6.x] Fixed is_safe_url() to handle leading whitespace.
This is a security fix. Disclosure following shortly.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/utils_tests/test_http.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py index 83dcd7c66a..60457fd438 100644 --- a/tests/utils_tests/test_http.py +++ b/tests/utils_tests/test_http.py @@ -109,7 +109,8 @@ class TestUtilsHttp(unittest.TestCase): 'http:/\//example.com', 'http:\/example.com', 'http:/\example.com', - 'javascript:alert("XSS")'): + 'javascript:alert("XSS")', + '\njavascript:alert(x)'): 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', |
