From 71233bcdf3c90098531901da4e380165ed0059d4 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Tue, 21 Apr 2009 23:31:01 +0000 Subject: [PATCH] Fixed #10884 - more lenient regexp for matching forms in CSRF post-processing Thanks to Ryszard Szopa for the report and fix git-svn-id: http://code.djangoproject.com/svn/django/trunk@10617 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/csrf/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/csrf/middleware.py b/django/contrib/csrf/middleware.py index f9c4ef7241..0d0a8eca9e 100644 --- a/django/contrib/csrf/middleware.py +++ b/django/contrib/csrf/middleware.py @@ -20,7 +20,7 @@ from django.utils.safestring import mark_safe _ERROR_MSG = mark_safe('

403 Forbidden

Cross Site Request Forgery detected. Request aborted.

') _POST_FORM_RE = \ - re.compile(r'(]*\bmethod=(\'|"|)POST(\'|"|)\b[^>]*>)', re.IGNORECASE) + re.compile(r'(]*\bmethod\s*=\s*(\'|"|)POST(\'|"|)\b[^>]*>)', re.IGNORECASE) _HTML_TYPES = ('text/html', 'application/xhtml+xml')