Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit afc6985267609d7782ec01817b051267fef48cd1 1 parent 8e3507c
Adrian Holovaty authored September 03, 2007

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/csrf/middleware.py
2  django/contrib/csrf/middleware.py
@@ -40,7 +40,7 @@ class CsrfMiddleware(object):
40 40
     """
41 41
     
42 42
     def process_request(self, request):
43  
-        if request.POST:
  43
+        if request.method == 'POST':
44 44
             try:
45 45
                 session_id = request.COOKIES[settings.SESSION_COOKIE_NAME]
46 46
             except KeyError:

0 notes on commit afc6985

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