#32571: CsrfViewMiddleware assumes referer header can be parsed
-------------------------------------+-------------------------------------
               Reporter:  Chris      |          Owner:  nobody
  Jerdonek                           |
                   Type:  Bug        |         Status:  new
              Component:  CSRF       |        Version:  3.1
               Severity:  Normal     |       Keywords:
           Triage Stage:             |  referer,CSRF,CsrfViewMiddleware
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Django's `CsrfViewMiddleware` assumes that the HTTP referer header is
 valid when checking it. Specifically, it doesn't handle the case of
 `urlparse()` raising a `ValueError` in this line (e.g. for urls like
 `'https://['`):
 
https://github.com/django/django/blob/45814af6197cfd8f4dc72ee43b90ecde305a1d5a/django/middleware/csrf.py#L244

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32571>
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.3e0a595b2b7f546945620632676d4cde%40djangoproject.com.

Reply via email to