From 4be1cdd80b08e1d6168bece05bf69cfae591aec7 Mon Sep 17 00:00:00 2001 From: ee7 <45465154+ee7@users.noreply.github.com> Date: Sun, 27 Dec 2020 21:20:01 +0100 Subject: [PATCH] canonical-schema: Fix UUID regex pattern Commit cea02afb494a (#1676) added a UUID to each test case. However, the regex pattern that it added to the canonical schema was too permissive, meaning that CI would pass on a PR that added, for example, a version 1 UUID (see #1735). Changes: - Use `a-f` instead of `a-z` - The third group must start with `4`. - The fourth group must start with `8`, `9`, `a` or `b`. --- canonical-schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/canonical-schema.json b/canonical-schema.json index 0702a62c8d..ba96cd733b 100644 --- a/canonical-schema.json +++ b/canonical-schema.json @@ -109,9 +109,9 @@ }, "uuid": - { "description": "A universally unique identifier in the v4 format" + { "description": "A version 4 UUID (compliant with RFC 4122) in the canonical textual representation" , "type" : "string" - , "pattern" : "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$" + , "pattern" : "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" }, "scenario":