Opened 13 years ago

Closed 13 years ago

#16009 closed Cleanup/optimization (fixed)

CSRF_FAILRE_TEMPLATE is misspelled

Reported by: adehnert Owned by: nobody
Component: CSRF Version: 1.3
Severity: Normal Keywords:
Cc: adehnert Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The CSRF_FAILRE_TEMPLATE variable appears to be misspelled.

diff --git a/django/views/csrf.py b/django/views/csrf.py
index 038b0b7..80cc21d 100644
--- a/django/views/csrf.py
+++ b/django/views/csrf.py
@@ -6,7 +6,7 @@ from django.conf import settings
 # this error message, especially for the sake of developers, and there isn't any
 # other way of making it available independent of what is in the settings file.
 
-CSRF_FAILRE_TEMPLATE = """
+CSRF_FAILURE_TEMPLATE = """
 <!DOCTYPE html>
 <html lang="en">
 <head>
@@ -94,7 +94,7 @@ def csrf_failure(request, reason=""):
     Default view used when request fails CSRF protection
     """
     from django.middleware.csrf import REASON_NO_REFERER
-    t = Template(CSRF_FAILRE_TEMPLATE)
+    t = Template(CSRF_FAILURE_TEMPLATE)
     c = Context({'DEBUG': settings.DEBUG,
                  'reason': reason,
                  'no_referer': reason == REASON_NO_REFERER

Change History (3)

comment:1 by adehnert, 13 years ago

Cc: adehnert added

comment:2 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedReady for checkin

And this comes after my "fail*t*ure" in #16002. The word "failure" must be prone to attracting typos :-)

comment:3 by Luke Plant, 13 years ago

Resolution: fixed
Status: newclosed

In [16216]:

Fixed #16009 - typo in CSRF_FAILRE_TEMPLATE.

Thanks to adehnert for report and patch.

Though I flail to see what problem it was causing...

Note: See TracTickets for help on using tickets.
Back to Top