diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-09-03 06:18:48 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-09-03 06:18:48 +0000 |
| commit | afc6985267609d7782ec01817b051267fef48cd1 (patch) | |
| tree | 6305609c023e0f59d5b3b1704050db82914ae1ec | |
| parent | 8e3507cd3ee7d77ce279420b8e9a627da7a62966 (diff) | |
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
| -rw-r--r-- | django/contrib/csrf/middleware.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/csrf/middleware.py b/django/contrib/csrf/middleware.py index 93a9484ca6..1ef0e6cefd 100644 --- a/django/contrib/csrf/middleware.py +++ b/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: |
