mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 12:44:21 -04:00
Whitelist the login fallback by default for SSO
This commit is contained in:
parent
88bb6c27e1
commit
c2ab0b3066
2 changed files with 28 additions and 2 deletions
|
@ -350,7 +350,18 @@ 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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue