From fd2a881a965df09d0102c6851094e0e8e946c2ea Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Mon, 5 Feb 2024 15:14:07 +0530 Subject: [PATCH] fix(jsonschema): corrects the regex for device volume paths (#268) The regex for device volume mount and subpath does not account for files and only accepts directories. However, this is not the expectation as we can mount either files or directories. This commit corrects the regex. Wrike Ticket: https://www.wrike.com/open.htm?id=1295041413 --- riocli/jsonschema/schemas/deployment-schema.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riocli/jsonschema/schemas/deployment-schema.yaml b/riocli/jsonschema/schemas/deployment-schema.yaml index 71ccead3..30fce64d 100755 --- a/riocli/jsonschema/schemas/deployment-schema.yaml +++ b/riocli/jsonschema/schemas/deployment-schema.yaml @@ -90,10 +90,10 @@ definitions: type: string mountPath: type: string - pattern: '^([\\/][a-z0-9\s\-_@\-^!#$%&.]*)+(\.[a-z][a-z0-9]+)?$' + pattern: '^\/$|(^(?=\/)|^\.|^\.\.)(\/(?=[^/\0])[^/\0]+)*\/?$' subPath: type: string - pattern: '^([\\/][a-z0-9\s\-_@\-^!#$%&.]*)+(\.[a-z][a-z0-9]+)?$' + pattern: '^\/$|(^(?=\/)|^\.|^\.\.)(\/(?=[^/\0])[^/\0]+)*\/?$' additionalProperties: false