1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #16870 -- Doc'd that CSRF protection requires the Referer header.

This commit is contained in:
Flávio Juvenal
2017-05-24 16:36:45 -07:00
committed by Tim Graham
parent e1cd5a76d7
commit 0af14b2eaa
3 changed files with 27 additions and 0 deletions

View File

@@ -55,6 +55,13 @@ class CsrfViewTests(SimpleTestCase):
'HTTPS connections, or for 'same-origin' requests.',
status_code=403,
)
self.assertContains(
response,
'If you are using the <meta name="referrer" '
'content="no-referrer"> tag or including the '
''Referrer-Policy: no-referrer' header, please remove them.',
status_code=403,
)
def test_no_cookies(self):
"""