diff --git a/CHANGELOG.md b/CHANGELOG.md index 712fdb697..cbe004d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Bug fix: Fabric v0.16.93 fixes `xgress.GetCircuit` to provide a `ctrl not ready` error response when requests arrive before the router is fully online. * Bug fix: `ziti edge login` will no longer truncate paths on controller URLs +* Bug ifx: Ziti CLI will now longer check the proper lengths of sha512 hashes in hex format # Release 0.22.0 diff --git a/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go b/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go index f7102a458..47f85f422 100644 --- a/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go +++ b/ziti/cmd/ziti/cmd/edge_controller/create_posture_check.go @@ -373,6 +373,7 @@ func cleanHexString(in string) string { } func cleanSha512s(in []string) ([]string, error) { + const sha512HexLength = 128 hashMap := map[string]struct{}{} for _, hash := range in { @@ -383,8 +384,8 @@ func cleanSha512s(in []string) ([]string, error) { } cleanHash := cleanHexString(hash) - if len(cleanHash) != 64 { - return nil, fmt.Errorf("sha512 hash must be 64 hex characters, given [%s], cleaned [%s] with a length of %d", hash, cleanHash, len(cleanHash)) + if len(cleanHash) != sha512HexLength { + return nil, fmt.Errorf("sha512 hash must be %d hex characters, given [%s], cleaned [%s] with a length of %d", sha512HexLength, hash, cleanHash, len(cleanHash)) } hashMap[cleanHash] = struct{}{}