mirror of
https://github.com/minio/minio.git
synced 2025-02-23 03:22:30 -05:00
fix: jwt error overrwriten by nil public key (#20387)
This commit is contained in:
parent
85f08d7752
commit
241be9709c
@ -148,7 +148,11 @@ func (r *Config) Validate(ctx context.Context, arn arn.ARN, token, accessToken,
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Invalid kid value %v", jwtToken.Header["kid"])
|
||||
}
|
||||
return r.pubKeys.get(kid), nil
|
||||
pubkey := r.pubKeys.get(kid)
|
||||
if pubkey == nil {
|
||||
return nil, fmt.Errorf("No public key found for kid %s", kid)
|
||||
}
|
||||
return pubkey, nil
|
||||
}
|
||||
|
||||
pCfg, ok := r.arnProviderCfgsMap[arn]
|
||||
|
Loading…
x
Reference in New Issue
Block a user