diff --git a/consul/state/prepared_query.go b/consul/state/prepared_query.go index c9c4f7e13..e49ebceeb 100644 --- a/consul/state/prepared_query.go +++ b/consul/state/prepared_query.go @@ -14,6 +14,11 @@ var validUUID = regexp.MustCompile(`(?i)^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f // isUUID returns true if the given string is a valid UUID. func isUUID(str string) bool { + const uuidLen = 36 + if len(str) != uuidLen { + return false + } + return validUUID.MatchString(str) }