Open callahad opened 6 years ago
Follow-on to #44 and #185.
ScudCloud 1.65 opens the SAML authentication link in a new browser window instead of continuing in-app for Slack teams using Auth0.
mozilla.slack.com
The SAML URL does not have a ?redir=... query parameter, so it fails to match SSO_URL_RE: https://github.com/raelgc/scudcloud/blob/e8f246a1e63169527b1ddec18850de0e5d7ca1ee/scudcloud/resources.py#L11
?redir=...
SSO_URL_RE
Shorten the regex to not examine the URL's query string:
diff --git a/scudcloud/resources.py b/scudcloud/resources.py index eff107b..b946d31 100644 --- a/scudcloud/resources.py +++ b/scudcloud/resources.py @@ -8,7 +8,7 @@ class Resources: SIGNIN_URL = 'https://slack.com/signin' MAINPAGE_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.slack.com/?$') MESSAGES_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.slack.com/messages/.*') - SSO_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.(enterprise.)?slack.com/sso/saml/start\?redir=.*') + SSO_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.(enterprise.)?slack.com/sso/saml/start') SERVICES_URL_RE = re.compile(r'^http[s]://[a-zA-Z0-9_\-]+.(enterprise.)?slack.com/services/.*') GOOGLE_OAUTH2_URL_RE = re.compile(r'^https://accounts.google.com/o/oauth')
(Worked for me, at least)
Hi @callahad and thanks for reporting this!
Do you mind to create a pull request with those changes?
Follow-on to #44 and #185.
ScudCloud 1.65 opens the SAML authentication link in a new browser window instead of continuing in-app for Slack teams using Auth0.
Steps to reproduce
mozilla.slack.com
in ScudCloudExpected behavior
Actual behavior
Root Cause
The SAML URL does not have a
?redir=...
query parameter, so it fails to matchSSO_URL_RE
: https://github.com/raelgc/scudcloud/blob/e8f246a1e63169527b1ddec18850de0e5d7ca1ee/scudcloud/resources.py#L11Possible Solution
Shorten the regex to not examine the URL's query string:
(Worked for me, at least)