#20038: Misleading port number in 'Invalid HTTP_HOST header' error message
--------------------------------------+------------------------------------
Reporter: wrr@… | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: HTTP handling | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bmispelon):
* cc: bmispelon@… (added)
* has_patch: 0 => 1
Comment:
The fix is actually a bit more complicated than that, because we cannot
assume that `host` is of the form `domain:port` (it could be an IPV6
address or even complete garbage).
I took a crack at it in my PR: https://github.com/django/django/pull/912
I also wonder if it'd be a good idea to validate `settings.ALLOWED_HOSTS`
(we could make sure that's it's a list, and that no entry contains a port
number).
--
Ticket URL: <https://code.djangoproject.com/ticket/20038#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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.