fix(settings): fix crash during settings update when not using oauth [EE-7031] (#11661)

pull/11673/head
Matt Hook 7 months ago committed by GitHub
parent 8ae64523b3
commit 4403503d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -96,8 +96,10 @@ func (payload *settingsUpdatePayload) Validate(r *http.Request) error {
} }
} }
if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader { if payload.OAuthSettings != nil {
return errors.New("Invalid OAuth AuthStyle") if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader {
return errors.New("Invalid OAuth AuthStyle")
}
} }
return nil return nil
} }

Loading…
Cancel
Save