mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: jwt error overrwriten by nil public key (#20387)
This commit is contained in:
@@ -148,7 +148,11 @@ func (r *Config) Validate(ctx context.Context, arn arn.ARN, token, accessToken,
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("Invalid kid value %v", jwtToken.Header["kid"])
|
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]
|
pCfg, ok := r.arnProviderCfgsMap[arn]
|
||||||
|
|||||||
Reference in New Issue
Block a user