From 96112d4a811f6916102def3c3ee1722631e3ab99 Mon Sep 17 00:00:00 2001 From: Sonia Sanz Vivas Date: Wed, 16 Oct 2024 09:16:36 +0200 Subject: [PATCH] Not allow # in index template name (#195776) Closes [#81870](https://github.com/elastic/kibana/issues/81870) ## Summary When creating a new Template, it did not prevent entering a #, but when saving the template the user received an error. The hash has been added to the list of invalid characters for the name. https://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94 (cherry picked from commit 4339f8465720c507351a2e65a6fe881a10dcd938) --- .../index_management/common/constants/invalid_characters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/index_management/common/constants/invalid_characters.ts b/x-pack/plugins/index_management/common/constants/invalid_characters.ts index 311de74f54733..e3a66477d71ae 100644 --- a/x-pack/plugins/index_management/common/constants/invalid_characters.ts +++ b/x-pack/plugins/index_management/common/constants/invalid_characters.ts @@ -7,4 +7,4 @@ export const INVALID_INDEX_PATTERN_CHARS = ['\\', '/', '?', '"', '<', '>', '|']; -export const INVALID_TEMPLATE_NAME_CHARS = ['"', '*', '\\', ',', '?']; +export const INVALID_TEMPLATE_NAME_CHARS = ['"', '*', '\\', ',', '?', '#'];