From aa019e15016d254d76f258c6ea0499ebc2a4c5d1 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Date: Thu, 20 Jul 2023 02:12:36 +0530 Subject: [PATCH] add pattern match for windmill stored secrets --- backend/src/integrations/sync.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts index f633cb88e..14ab37ea5 100644 --- a/backend/src/integrations/sync.ts +++ b/backend/src/integrations/sync.ts @@ -1993,7 +1993,8 @@ const syncSecretsWindmill = async ({ Object.keys(secrets).forEach( (key) => { - if(key.startsWith("u/") || key.startsWith("f/")) { + const pattern = new RegExp('^([a-zA-Z0-9])\/([a-zA-Z-0-9])+\/([a-zA-Z0-9])+') + if((key.startsWith("u/") || key.startsWith("f/")) && pattern.test(key)) { if(secretsResList.includes(key)) { modifiedFormatForUpdateSecretInjection.push({ path: key,