From 2256e23c9ef7295b0001b1723be491254bfe73fe Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 2 Feb 2018 07:29:11 -0600 Subject: 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 --- app/oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/oauth.go') 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) } -- cgit v1.2.3-1-g7c22