Fixed #1827 - added 'id' attribute to generated CSRF hidden field. Good call, Ian Holsman.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c427479539
commit
c26553c4f9
|
@ -78,7 +78,7 @@ class CsrfMiddleware(object):
|
||||||
|
|
||||||
# Modify any POST forms
|
# Modify any POST forms
|
||||||
extra_field = "<div style='display:none;'>" + \
|
extra_field = "<div style='display:none;'>" + \
|
||||||
"<input type='hidden' name='csrfmiddlewaretoken' value='" + \
|
"<input type='hidden' id='csrfmiddlewaretoken' name='csrfmiddlewaretoken' value='" + \
|
||||||
csrf_token + "' /></div>"
|
csrf_token + "' /></div>"
|
||||||
response.content = _POST_FORM_RE.sub('\\1' + extra_field, response.content)
|
response.content = _POST_FORM_RE.sub('\\1' + extra_field, response.content)
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Reference in New Issue