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

Fixed bug causing CSRF token not to rotate on login.

Thanks Gavin McQuillan for the report.
This commit is contained in:
Tim Graham
2013-10-17 19:51:45 -04:00
parent a800036981
commit ac4fec5ca2
2 changed files with 4 additions and 2 deletions

View File

@@ -531,7 +531,6 @@ class LoginTest(AuthViewsTestCase):
CsrfViewMiddleware().process_view(req, login_view, (), {})
req.META["SERVER_NAME"] = "testserver" # Required to have redirect work in login view
req.META["SERVER_PORT"] = 80
req.META["CSRF_COOKIE_USED"] = True
resp = login_view(req)
resp2 = CsrfViewMiddleware().process_response(req, resp)
csrf_cookie = resp2.cookies.get(settings.CSRF_COOKIE_NAME, None)