[Django] #32311: Add system check for CSRF_FAILURE_VIEW setting

33 views
Skip to first unread message

Django

unread,
Jan 3, 2021, 4:54:23 AM1/3/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
------------------------------------------------+------------------------
Reporter: Adam Johnson | Owner: nobody
Type: New feature | Status: new
Component: Core (System checks) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Check #29642 added checks for the custom 400, 404, etc. error views.
Similarly, a check should be added to ensure that the custom CSRF failure
view as configured in the CSRF_FAILURE_VIEW setting exists and has the
right function signature

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

Django

unread,
Jan 3, 2021, 4:55:23 AM1/3/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------

Reporter: Adam Johnson | Owner: nobody
Type: New feature | Status: new
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Adam Johnson:

Old description:

> Check #29642 added checks for the custom 400, 404, etc. error views.
> Similarly, a check should be added to ensure that the custom CSRF failure
> view as configured in the CSRF_FAILURE_VIEW setting exists and has the
> right function signature

New description:

Check #29642 added checks for the custom 400, 404, etc. error views.
Similarly, a check should be added to ensure that the custom CSRF failure
view as configured in the CSRF_FAILURE_VIEW setting exists and has the

right function signature. There's otherwise no verification that it's well
configured, and it will only fail when a CSRF error occurs.

--

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

Django

unread,
Jan 3, 2021, 1:28:58 PM1/3/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
--------------------------------------+------------------------------------

Reporter: Adam Johnson | Owner: nobody
Type: New feature | Status: new
Component: Core (System checks) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


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

Django

unread,
Jan 3, 2021, 5:55:10 PM1/3/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned

Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* owner: nobody => Hasan Ramezani
* status: new => assigned


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

Django

unread,
Jan 4, 2021, 9:54:23 AM1/4/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Hasan Ramezani):

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

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

Django

unread,
Jan 4, 2021, 10:59:03 AM1/4/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Johnson):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


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

Django

unread,
Jan 4, 2021, 10:59:45 AM1/4/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

Comment (by Adam Johnson):

Btw Hasan, in future when you make a PR please check 'has patch' on Trac,
otherwise it'll take longer for people to notice.

--
Ticket URL: <https://code.djangoproject.com/ticket/32311#comment:6>

Django

unread,
Jan 4, 2021, 11:57:30 AM1/4/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/32311#comment:7>

Django

unread,
Jan 4, 2021, 1:41:05 PM1/4/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Johnson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32311#comment:8>

Django

unread,
Jan 12, 2021, 3:44:54 AM1/12/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: closed

Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"64331419c848a8b6835b25f2c600d7150f722c96" 64331419]:
{{{
#!CommitTicketReference repository=""
revision="64331419c848a8b6835b25f2c600d7150f722c96"
Fixed #32311 -- Added system check for CSRF_FAILURE_VIEW setting.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32311#comment:9>

Django

unread,
Jan 12, 2021, 5:22:30 AM1/12/21
to django-...@googlegroups.com
#32311: Add system check for CSRF_FAILURE_VIEW setting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Hasan
| Ramezani
Type: New feature | Status: closed
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"ba3fb2e4d0aca26f6ea37d7e31488ad09043f89d" ba3fb2e4]:
{{{
#!CommitTicketReference repository=""
revision="ba3fb2e4d0aca26f6ea37d7e31488ad09043f89d"
Refs #32311 -- Fixed CSRF_FAILURE_VIEW system check errors code.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32311#comment:10>

Reply all
Reply to author
Forward
0 new messages