From 7debaa41d54f2cf287709a7aaed83eba35c21039 Mon Sep 17 00:00:00 2001 From: Rafat Alhawash Date: Wed, 24 Jul 2019 00:25:02 -0700 Subject: [PATCH] less strict uuid validator changed the Regex to validate uuid generated by mssql, since it's not following the v4 uuid standard. --- packages/crud-request/src/request-query.validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/crud-request/src/request-query.validator.ts b/packages/crud-request/src/request-query.validator.ts index 7bd62245..f8f5fa35 100644 --- a/packages/crud-request/src/request-query.validator.ts +++ b/packages/crud-request/src/request-query.validator.ts @@ -102,7 +102,7 @@ export function validateParamOption(options: ParamsOptions, name: string) { } export function validateUUID(str: string, name: string) { - const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/i; + const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; if (!uuid.test(str)) { throw new RequestQueryException(`Invalid param ${name}. UUID string expected`); }