#32578: Handle request.get_host() raising DisallowedHost in
CsrfViewMiddleware._origin_verified()
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: CSRF | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
CsrfViewMiddleware,DisallowedHost | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Chris Jerdonek):
Another option would be for `get_host()` to accept an argument that causes
it to return e.g. `None` on a disallowed host instead of raising
`DisallowedHost`. That would make people more aware of that possibility
and give callers another option aside from a try-except for handling that
case.
--
Ticket URL: <https://code.djangoproject.com/ticket/32578#comment:2>
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/067.51c9316e0ef88464fd29e725803be338%40djangoproject.com.