Skip to content

Commit

Permalink
Do not validate deployment id from license if nil uuid (#4856)
Browse files Browse the repository at this point in the history
In some very rare cases the license can contain a nil uuid
(00000000-0000-0000-0000-000000000000). Do not validate it against the
cluster's deployment id during registration.
  • Loading branch information
anjalshireesh committed Feb 24, 2024
1 parent 403bf6b commit 744dc91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/subnet-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ func validateAndSaveLic(lic, alias string, saveAPIKey bool) string {
fatalIf(errDummy().Trace(), fmt.Sprintf("License has expired on %s", li.ExpiresAt))
}

if len(li.DeploymentID) > 0 && li.DeploymentID != getAdminInfo(alias).DeploymentID {
if len(li.DeploymentID) > 0 && li.DeploymentID != uuid.Nil.String() && li.DeploymentID != getAdminInfo(alias).DeploymentID {
fatalIf(errDummy().Trace(), fmt.Sprintf("License is invalid for the deployment %s", alias))
}

Expand Down

0 comments on commit 744dc91

Please sign in to comment.