mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed a security issue related to password resets
Full disclosure and new release are forthcoming
This commit is contained in:
@@ -180,6 +180,11 @@ class HttpRequest(object):
|
||||
server_port = str(self.META['SERVER_PORT'])
|
||||
if server_port != ('443' if self.is_secure() else '80'):
|
||||
host = '%s:%s' % (host, server_port)
|
||||
|
||||
# Disallow potentially poisoned hostnames.
|
||||
if set(';/?@&=+$,').intersection(host):
|
||||
raise SuspiciousOperation('Invalid HTTP_HOST header: %s' % host)
|
||||
|
||||
return host
|
||||
|
||||
def get_full_path(self):
|
||||
|
||||
Reference in New Issue
Block a user