From abb8b3c90555762c392bfac27b842af536e3661a Mon Sep 17 00:00:00 2001 From: Kshitij Tandon Date: Thu, 26 Dec 2024 18:03:52 +0530 Subject: [PATCH] Fixing bug in transform API validation Signed-off-by: Kshitij Tandon --- server/routes/transforms.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes/transforms.ts b/server/routes/transforms.ts index bb5b1da97..3bfef0abd 100644 --- a/server/routes/transforms.ts +++ b/server/routes/transforms.ts @@ -113,7 +113,7 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab params: schema.object({ index: schema.string({ validate: (value) => { - const invalidCharactersPattern = /[\s,:\"*+\/\\|?#><]/; + const invalidCharactersPattern = /[\s,:\"+\/\\|?#><]/; if (value !== value.toLowerCase() || value.startsWith("_") || value.startsWith("-") || invalidCharactersPattern.test(value)) { return "Invalid index name."; } @@ -148,7 +148,7 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab { source_index: schema.string({ validate: (value) => { - const invalidCharactersPattern = /[\s,:\"*+\/\\|?#><]/; + const invalidCharactersPattern = /[\s,:\"+\/\\|?#><]/; if ( value !== value.toLowerCase() || value.startsWith("_") ||