summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-03-27 15:34:41 +0100
committerGitHub <noreply@github.com>2020-03-27 15:34:41 +0100
commit319c41f573eb14a966367b60b2e6e93bf6b028d9 (patch)
treee06b3dd08144f896551dea3a5b764b377f43be69 /tests
parentMerge tag 'v1.12.0' (diff)
parentUpdate the wording of the config comment (diff)
downloadsynapse-319c41f573eb14a966367b60b2e6e93bf6b028d9.tar.xz
Merge pull request #7153 from matrix-org/babolivier/sso_whitelist_login_fallback
Always whitelist the login fallback for SSO
Diffstat (limited to 'tests')
-rw-r--r--tests/rest/client/v1/test_login.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/rest/client/v1/test_login.py b/tests/rest/client/v1/test_login.py

index da2c9bfa1e..aed8853d6e 100644 --- a/tests/rest/client/v1/test_login.py +++ b/tests/rest/client/v1/test_login.py
@@ -350,7 +350,14 @@ class CASRedirectConfirmTestCase(unittest.HomeserverTestCase): def test_cas_redirect_whitelisted(self): """Tests that the SSO login flow serves a redirect to a whitelisted url """ - redirect_url = "https://legit-site.com/" + self._test_redirect("https://legit-site.com/") + + @override_config({"public_baseurl": "https://example.com"}) + def test_cas_redirect_login_fallback(self): + self._test_redirect("https://example.com/_matrix/static/client/login") + + def _test_redirect(self, redirect_url): + """Tests that the SSO login flow serves a redirect for the given redirect URL.""" cas_ticket_url = ( "/_matrix/client/r0/login/cas/ticket?redirectUrl=%s&ticket=ticket" % (urllib.parse.quote(redirect_url))