summary refs log tree commit diff
path: root/synapse/config/sso.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-22 19:11:54 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-22 19:11:54 +0100
commit3e6a798ee777013d198830ad71a527f9c6e6cdf5 (patch)
tree1d777ee02594645add0c68544418813ba3e4d2cb /synapse/config/sso.py
parentMerge commit 'fb0e14ee9' into anoa/dinsic_release_1_31_0 (diff)
parentBackout changes for automatically calculating the public baseurl. (#9313) (diff)
downloadsynapse-3e6a798ee777013d198830ad71a527f9c6e6cdf5.tar.xz
Merge commit 'e40d88cff' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/config/sso.py')
-rw-r--r--synapse/config/sso.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/config/sso.py b/synapse/config/sso.py

index 6c60c6fea4..19bdfd462b 100644 --- a/synapse/config/sso.py +++ b/synapse/config/sso.py
@@ -64,8 +64,11 @@ class SSOConfig(Config): # gracefully to the client). This would make it pointless to ask the user for # confirmation, since the URL the confirmation page would be showing wouldn't be # the client's. - login_fallback_url = self.public_baseurl + "_matrix/static/client/login" - self.sso_client_whitelist.append(login_fallback_url) + # public_baseurl is an optional setting, so we only add the fallback's URL to the + # list if it's provided (because we can't figure out what that URL is otherwise). + if self.public_baseurl: + login_fallback_url = self.public_baseurl + "_matrix/static/client/login" + self.sso_client_whitelist.append(login_fallback_url) def generate_config_section(self, **kwargs): return """\ @@ -83,9 +86,9 @@ class SSOConfig(Config): # phishing attacks from evil.site. To avoid this, include a slash after the # hostname: "https://my.client/". # - # The login fallback page (used by clients that don't natively support the - # required login flows) is automatically whitelisted in addition to any URLs - # in this list. + # If public_baseurl is set, then the login fallback page (used by clients + # that don't natively support the required login flows) is whitelisted in + # addition to any URLs in this list. # # By default, this list is empty. #