mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
auth: Pass None
as default_subdomain
to verify the host.
We were not verifying correctly if the host is in the same subdomain as we never returned None for get_subdomain_from_hostname.
This commit is contained in:
@@ -34,7 +34,7 @@ def get_subdomain_from_hostname(
|
||||
m = re.search(rf"\.{settings.EXTERNAL_HOST}(:\d+)?$", host)
|
||||
if m:
|
||||
subdomain = host[: m.start()]
|
||||
if subdomain in settings.ROOT_SUBDOMAIN_ALIASES:
|
||||
if default_subdomain is not None and subdomain in settings.ROOT_SUBDOMAIN_ALIASES:
|
||||
return default_subdomain
|
||||
return subdomain
|
||||
|
||||
|
Reference in New Issue
Block a user