mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed CVE-2016-9014 -- Validated Host header when DEBUG=True.
This is a security fix.
This commit is contained in:
parent
da7910d483
commit
7fe2d8d940
7 changed files with 95 additions and 21 deletions
|
@ -386,7 +386,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue