#34830: csrf_failure view missing context processors
-----------------------------+------------------------------------
Reporter: Alex Henman | Owner: nobody
Type: Bug | Status: new
Component: CSRF | Version: dev
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 Natalia Bidart):
* version: 4.2 => dev
* stage: Unreviewed => Accepted
Comment:
Accepting since it's easily reproducible and the proposed fix makes sense.
As far as I see, the change should not be backwards compatible.
Do note that the request should be pass in the context and not as an extra
param:
{{{#!diff
--- a/django/views/csrf.py
+++ b/django/views/csrf.py
@@ -64,6 +64,7 @@ def csrf_failure(request, reason="",
template_name=CSRF_FAILURE_TEMPLATE_NAME):
"DEBUG": settings.DEBUG,
"docs_version": get_docs_version(),
"more": _("More information is available with DEBUG=True."),
+ "request": request,
}
try:
t = loader.get_template(template_name)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34830#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018a8b8a670b-700d8ba7-0aef-4f4e-af2a-b73c63853544-000000%40eu-central-1.amazonses.com.