#32842: Refactor out a _check_token() method of CsrfViewMiddleware
-------------------------------------+-------------------------------------
               Reporter:  Chris      |          Owner:  Chris Jerdonek
  Jerdonek                           |
                   Type:             |         Status:  assigned
  Cleanup/optimization               |
              Component:  CSRF       |        Version:  dev
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 This ticket is to refactor the following 40 lines of
 `CsrfViewMiddleware.process_view()`:
 
https://github.com/django/django/blob/854e9b066850b9b4eb1171966e996322b2c16d27/django/middleware/csrf.py#L377-L417
 into a new `CsrfViewMiddleware._check_token()` method, similar to how
 
[https://github.com/django/django/blob/854e9b066850b9b4eb1171966e996322b2c16d27/django/middleware/csrf.py#L372-L375
 CsrfViewMiddleware._check_referer()] was done in #32596. This would group
 together all of the token-related logic and further reduce the size of
 `process_view(), which is currently 90 lines long.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32842>
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/052.66fc63cb626c7dc4f2cac82a73e93b83%40djangoproject.com.

Reply via email to