Remove extra validation line

pull/18140/head
Jeremy Jacobson 2023-07-19 09:52:05 -07:00
parent 5958ae0921
commit 536e6f3b3b
1 changed files with 2 additions and 5 deletions

View File

@ -354,12 +354,9 @@ func persistTLSCerts(dir string, serverCert, serverKey string, caCerts []string)
return nil
}
// Basic validation to ensure a UUID was loaded.
// Basic validation to ensure a UUID was loaded and assumes the token is non-empty
func validateManagementToken(token string) error {
if token == "" {
return errors.New("missing HCP management token")
}
// note: we assume that the token is not an empty string
if _, err := uuid.ParseUUID(token); err != nil {
return errors.New("management token is not a valid UUID")
}