mirror of
https://github.com/minio/minio.git
synced 2025-04-21 11:04:20 -04:00
licverifier: fail verify if accountId is missing in license metadata (#10258)
This commit is contained in:
parent
43e6d1ce2d
commit
4e00b47b52
@ -64,7 +64,7 @@ func NewLicenseVerifier(pemBytes []byte) (*LicenseVerifier, error) {
|
|||||||
// the claim values are invalid.
|
// the claim values are invalid.
|
||||||
func toLicenseInfo(claims jwt.MapClaims) (LicenseInfo, error) {
|
func toLicenseInfo(claims jwt.MapClaims) (LicenseInfo, error) {
|
||||||
accID, ok := claims[accountID].(float64)
|
accID, ok := claims[accountID].(float64)
|
||||||
if ok && accID <= 0 {
|
if !ok || ok && accID <= 0 {
|
||||||
return LicenseInfo{}, errors.New("Invalid accountId in claims")
|
return LicenseInfo{}, errors.New("Invalid accountId in claims")
|
||||||
}
|
}
|
||||||
email, ok := claims[sub].(string)
|
email, ok := claims[sub].(string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user