#24834: Optional port in Host request header breaks get_current_site()
-------------------------------+------------------------------------
     Reporter:  ngnpope        |                    Owner:  ngnpope
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.sites  |                  Version:  1.5
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  1
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by ngnpope):

 Hi,

 Sorry for the delay in getting back to this. I have already finished the
 code changes and am just finishing up the documentation now after which I
 will issue a new pull request.

 I will be putting this forward for 1.9 but would like it to be considered
 for a backport to 1.8 as, while not a regression, the current behaviour is
 unexpected. It results in a situation where, even though the
 `ALLOWED_HOSTS` settings is restricted to a specific domain and that
 domain is present in a `Site` record, a user can submit a `Host` header
 with that domain combined with a port and trigger `Site.DoesNotExist`,
 particularly when using `CurrentSiteMiddleware`.

--
Ticket URL: <https://code.djangoproject.com/ticket/24834#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/065.e9e2d81a209cec97886724cba8f14ff4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to