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
Этот коммит содержится в:
Chris
2018-02-02 07:29:11 -06:00
коммит произвёл Joram Wilander
родитель 0cd2895456
Коммит 2256e23c9e
2 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@@ -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)
}