mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05: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.
|
||||
func toLicenseInfo(claims jwt.MapClaims) (LicenseInfo, error) {
|
||||
accID, ok := claims[accountID].(float64)
|
||||
if ok && accID <= 0 {
|
||||
if !ok || ok && accID <= 0 {
|
||||
return LicenseInfo{}, errors.New("Invalid accountId in claims")
|
||||
}
|
||||
email, ok := claims[sub].(string)
|
||||
|
Loading…
x
Reference in New Issue
Block a user