Revert "Merge pull request #7153 from matrix-org/babolivier/sso_whitelist_login_fallback"

This was incorrectly merged to master.

This reverts commit 319c41f573, reversing
changes made to 229eb81498.
This commit is contained in:
Richard van der Hoff 2020-03-27 20:21:09 +00:00
parent 8d4cbdeaa9
commit 0122ef1037
4 changed files with 1 additions and 28 deletions

View file

@ -350,14 +350,7 @@ class CASRedirectConfirmTestCase(unittest.HomeserverTestCase):
def test_cas_redirect_whitelisted(self):
"""Tests that the SSO login flow serves a redirect to a whitelisted url
"""
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."""
redirect_url = "https://legit-site.com/"
cas_ticket_url = (
"/_matrix/client/r0/login/cas/ticket?redirectUrl=%s&ticket=ticket"
% (urllib.parse.quote(redirect_url))