1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.10.x] Fixed CVE-2016-9014 -- Validated Host header when DEBUG=True.

This is a security fix.
This commit is contained in:
Tim Graham
2016-10-17 12:14:49 -04:00
parent 34e10720d8
commit 884e113838
7 changed files with 95 additions and 22 deletions

View File

@@ -377,7 +377,7 @@ class CsrfViewMiddlewareTest(SimpleTestCase):
self.assertEqual(len(csrf_cookie.value), CSRF_TOKEN_LENGTH)
self._check_token_present(resp, csrf_id=csrf_cookie.value)
@override_settings(DEBUG=True)
@override_settings(DEBUG=True, ALLOWED_HOSTS=['www.example.com'])
def test_https_bad_referer(self):
"""
Test that a POST HTTPS request with a bad referer is rejected