fix crash when config is not properly initialized (#12714)

fixes #12709
This commit is contained in:
Harshavardhana
2021-07-14 18:27:25 -07:00
committed by GitHub
parent 92ffe5e5ef
commit 10fc30a989
4 changed files with 41 additions and 47 deletions

View File

@@ -723,8 +723,8 @@ func loadConfig(objAPI ObjectLayer) error {
func getOpenIDValidators(cfg openid.Config) *openid.Validators {
validators := openid.NewValidators()
if cfg.JWKS.URL != nil {
validators.Add(openid.NewJWT(cfg))
if cfg.Enabled {
validators.Add(&cfg)
}
return validators