#25099: Cleanup HttpRequest representations in error reporting
--------------------------------------+------------------------------------
Reporter: vzima | Owner: vzima
Type: Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by carljm):
Allowed hosts are validated in `get_host()` specifically in order to
enable the latter possibility: we didn't want to enforce use of
`ALLOWED_HOSTS` on a site which never made use of the `Host` header at
all. If the `Host` header is not in fact used, then a spoofed `Host`
header has no effect, and there is no concern.
Rather than adding a new argument to `get_host()`, I'd prefer to introduce
a new private `_get_raw_host()` or similar, which could be called within
`get_host()` too. I guess that's needed (as opposed to just getting the
raw Host direct from `request.META` in order to handle `X-Forwarded-Host`
et al.
--
Ticket URL: <https://code.djangoproject.com/ticket/25099#comment:8>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.76fcaffc5ec424eecfb5fd978cee1129%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.