From 8beaa09328830b9d9969063d0c481861c4482974 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Tue, 8 Nov 2022 17:02:31 +0000 Subject: [PATCH] Block lucene special characters from new column --- .../components/backend/DataTable/modals/CreateEditColumn.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index dce6df6d0d..a2400f1836 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -304,6 +304,8 @@ const newError = {} if (!external && fieldInfo.name?.startsWith("_")) { newError.name = `Column name cannot start with an underscore.` + } else if (fieldInfo.name?.match(/[\-!*+?^"{}()~\/[\]\\]/g)) { + newError.name = `Illegal character; cannot be: + - ! ( ) { } [ ] ^ " ~ * ? : \\ /` } else if (PROHIBITED_COLUMN_NAMES.some(name => fieldInfo.name === name)) { newError.name = `${PROHIBITED_COLUMN_NAMES.join( ", "