mirror of
https://github.com/django/django.git
synced 2025-01-22 00:02:15 +00:00
Fixed #5292 -- Changed CSRF middleware to check for request.method == 'POST' instead of request.POST dictionary not being empty. Thanks, Jakub Wilk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8e3507cd3e
commit
afc6985267
@ -40,7 +40,7 @@ class CsrfMiddleware(object):
|
||||
"""
|
||||
|
||||
def process_request(self, request):
|
||||
if request.POST:
|
||||
if request.method == 'POST':
|
||||
try:
|
||||
session_id = request.COOKIES[settings.SESSION_COOKIE_NAME]
|
||||
except KeyError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user