[Django] #26181: Documentation: AJAX, CSRF and Angular

19 views
Skip to first unread message

Django

unread,
Feb 7, 2016, 10:33:32 AM2/7/16
to django-...@googlegroups.com
#26181: Documentation: AJAX, CSRF and Angular
-------------------------------+---------------------------
Reporter: jliendo | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords: CSRF, angular
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+---------------------------
On

[https://docs.djangoproject.com/en/1.9/ref/csrf/#ajax], it says:

If you’re using AngularJS 1.1.3 and newer, it’s sufficient to configure
the $http provider with the cookie and header names:


{{{
$http.defaults.xsrfCookieName = 'csrftoken';
$http.defaults.xsrfHeaderName = 'X-CSRFToken';
}}}

I think that it should read,


{{{
$httpProvider.defaults.xsrfCookieName = 'csrftoken';
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
}}}


On angular HTTP default headers are defined on the $httpProvider object.

--
Ticket URL: <https://code.djangoproject.com/ticket/26181>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 7, 2016, 2:06:01 PM2/7/16
to django-...@googlegroups.com
#26181: Documentation: AJAX, CSRF and Angular
-------------------------------+--------------------------------------
Reporter: jliendo | Owner: userimack
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:

Keywords: CSRF, angular | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by userimack):

* owner: nobody => userimack
* needs_docs: => 0
* status: new => assigned
* needs_tests: => 0
* needs_better_patch: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26181#comment:1>

Django

unread,
Feb 8, 2016, 7:27:57 AM2/8/16
to django-...@googlegroups.com
#26181: Documentation: AJAX, CSRF and Angular
-------------------------------+-------------------------------------

Reporter: jliendo | Owner: userimack
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: CSRF, angular | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26181#comment:2>

Django

unread,
Feb 9, 2016, 9:33:40 AM2/9/16
to django-...@googlegroups.com
#26181: AngularJS CSRF example is incorrect
-------------------------------------+-------------------------------------

Reporter: jliendo | Owner: userimack
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: CSRF, angular | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/6106 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26181#comment:3>

Django

unread,
Feb 9, 2016, 9:38:02 AM2/9/16
to django-...@googlegroups.com
#26181: AngularJS CSRF example is incorrect
-------------------------------------+-------------------------------------
Reporter: jliendo | Owner: userimack
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: CSRF, angular | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"7a7b82e6f4c34fbfd7a11123986ed74f9f752a48" 7a7b82e6]:
{{{
#!CommitTicketReference repository=""
revision="7a7b82e6f4c34fbfd7a11123986ed74f9f752a48"
Fixed #26181 -- Corrected AngularJS CSRF example.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26181#comment:4>

Django

unread,
Feb 9, 2016, 9:38:16 AM2/9/16
to django-...@googlegroups.com
#26181: AngularJS CSRF example is incorrect
-------------------------------------+-------------------------------------
Reporter: jliendo | Owner: userimack
Type: Bug | Status: closed
Component: Documentation | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: CSRF, angular | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"f3194d951d96dd14e0ffd288649f4e9135ce0ab5" f3194d95]:
{{{
#!CommitTicketReference repository=""
revision="f3194d951d96dd14e0ffd288649f4e9135ce0ab5"
[1.9.x] Fixed #26181 -- Corrected AngularJS CSRF example.

Backport of 7a7b82e6f4c34fbfd7a11123986ed74f9f752a48 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26181#comment:5>

Reply all
Reply to author
Forward
0 new messages