#15259: Django Weblog suggested workaround for XMLHttpRequest CSRF fix in 1.2.5
uses wrong jQuery selector
-----------------------------+----------------------------------------------
Reporter: markhellewell | Owner: nobody
Status: new | Milestone:
Component: Django Web site | Version: 1.2
Keywords: | Triage Stage: Unreviewed
Has patch: 0 |
-----------------------------+----------------------------------------------
The "{% csrf_token %}" template tag outputs a form field which looks like
this:
{{{
<input type='hidden' name='csrfmiddlewaretoken' value='...'/>
}}}
but the jQuery example of how to include this in your XMLHttpRequest uses
an id-style selector. It should instead look like this:
{{{
$("input[name='csrfmiddlewaretoken']").val()
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/15259>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.