summaryrefslogtreecommitdiffstats
path: root/app/oauth.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-02 07:29:11 -0600
committerJoram Wilander <jwawilander@gmail.com>2018-02-02 08:29:11 -0500
commit2256e23c9ef7295b0001b1723be491254bfe73fe (patch)
tree30d7742048383907f6837c7cf876a55af0805467 /app/oauth.go
parent0cd2895456f953ef871e10421361578b6c8d4add (diff)
downloadchat-2256e23c9ef7295b0001b1723be491254bfe73fe.tar.gz
chat-2256e23c9ef7295b0001b1723be491254bfe73fe.tar.bz2
chat-2256e23c9ef7295b0001b1723be491254bfe73fe.zip
ABC-153: don't use http redirects with 4xx/5xx status codes (#8178)
* don't use http redirects with 4xx/5xx status codes * minor html syntax fix
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 3202ac5ed..1cce5a3a0 100644
--- a/app/oauth.go
+++ b/app/oauth.go
@@ -564,7 +564,7 @@ func generateOAuthStateTokenExtra(email, action, cookie string) string {
func (a *App) GetAuthorizationCode(w http.ResponseWriter, r *http.Request, service string, props map[string]string, loginHint string) (string, *model.AppError) {
sso := a.Config().GetSSOService(service)
- if sso != nil && !sso.Enable {
+ if sso == nil || !sso.Enable {
return "", model.NewAppError("GetAuthorizationCode", "api.user.get_authorization_code.unsupported.app_error", nil, "service="+service, http.StatusNotImplemented)
}