summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-10-31 10:13:46 -0700
committerGitHub <noreply@github.com>2017-10-31 10:13:46 -0700
commit3024525c3b2ba8fb0f3f83223dd15fa721cca638 (patch)
tree2d06f8da01f20027ac590e2134bec95702fc25ae /app/oauth.go
parent06ec648cf30e3968c0fdb2514c8d59dff97c757c (diff)
downloadchat-3024525c3b2ba8fb0f3f83223dd15fa721cca638.tar.gz
chat-3024525c3b2ba8fb0f3f83223dd15fa721cca638.tar.bz2
chat-3024525c3b2ba8fb0f3f83223dd15fa721cca638.zip
Fixing URL encoding of SAML email address when switching to SAML account (#7733)
Diffstat (limited to 'app/oauth.go')
-rw-r--r--app/oauth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/oauth.go b/app/oauth.go
index 99794482a..0aba154fa 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -732,7 +732,7 @@ func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email,
stateProps["email"] = email
if service == model.USER_AUTH_SERVICE_SAML {
- return utils.GetSiteURL() + "/login/sso/saml?action=" + model.OAUTH_ACTION_EMAIL_TO_SSO + "&email=" + email, nil
+ return utils.GetSiteURL() + "/login/sso/saml?action=" + model.OAUTH_ACTION_EMAIL_TO_SSO + "&email=" + utils.UrlEncode(email), nil
} else {
if authUrl, err := a.GetAuthorizationCode(w, r, service, stateProps, ""); err != nil {
return "", err