Ticket #17732: django-csrf-missing-help-cookies-view.patch
File django-csrf-missing-help-cookies-view.patch, 664 bytes (added by , 13 years ago) |
---|
-
django/middleware/csrf.py
176 176 # and possible for PUT/DELETE. 177 177 request_csrf_token = request.META.get('HTTP_X_CSRFTOKEN', '') 178 178 179 if not request.session.test_cookie_worked(): 180 return self._reject(request, REASON_NO_CSRF_COOKIE) 181 179 182 if not constant_time_compare(request_csrf_token, csrf_token): 180 183 logger.warning('Forbidden (%s): %s', 181 184 REASON_BAD_TOKEN, request.path,