Skip to content
Browse files

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
  • Loading branch information...
1 parent 8e3507c commit afc6985267609d7782ec01817b051267fef48cd1 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/csrf/middleware.py
View
2 django/contrib/csrf/middleware.py
@@ -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:

0 comments on commit afc6985

Please sign in to comment.
Something went wrong with that request. Please try again.