diff --git a/api/http/handler/settings/settings_update.go b/api/http/handler/settings/settings_update.go index 2b9ceb5c3..eff0eb93b 100644 --- a/api/http/handler/settings/settings_update.go +++ b/api/http/handler/settings/settings_update.go @@ -96,8 +96,10 @@ func (payload *settingsUpdatePayload) Validate(r *http.Request) error { } } - if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader { - return errors.New("Invalid OAuth AuthStyle") + if payload.OAuthSettings != nil { + if payload.OAuthSettings.AuthStyle < oauth2.AuthStyleAutoDetect || payload.OAuthSettings.AuthStyle > oauth2.AuthStyleInHeader { + return errors.New("Invalid OAuth AuthStyle") + } } return nil }