Skip to content

Commit

Permalink
[8.x] Not allow # in index template name (#195776) (#196485)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [Not allow # in index template name
(#195776)](#195776)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T07:16:36Z","message":"Not
allow # in index template name (#195776)\n\nCloses
[#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n##
Summary\r\n\r\nWhen creating a new Template, it did not prevent entering
a #, but when\r\nsaving the template the user received an error. The
hash has been added\r\nto the list of invalid characters for the
name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Not
allow # in index template
name","number":195776,"url":"https://github.com/elastic/kibana/pull/195776","mergeCommit":{"message":"Not
allow # in index template name (#195776)\n\nCloses
[#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n##
Summary\r\n\r\nWhen creating a new Template, it did not prevent entering
a #, but when\r\nsaving the template the user received an error. The
hash has been added\r\nto the list of invalid characters for the
name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195776","number":195776,"mergeCommit":{"message":"Not
allow # in index template name (#195776)\n\nCloses
[#81870](https://github.com/elastic/kibana/issues/81870)\r\n\r\n##
Summary\r\n\r\nWhen creating a new Template, it did not prevent entering
a #, but when\r\nsaving the template the user received an error. The
hash has been added\r\nto the list of invalid characters for the
name.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2b59d245-c96f-4215-ad89-a3201bef5e94","sha":"4339f8465720c507351a2e65a6fe881a10dcd938"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <[email protected]>
  • Loading branch information
kibanamachine and SoniaSanzV authored Oct 16, 2024
1 parent 5c6d903 commit e061949
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

export const INVALID_INDEX_PATTERN_CHARS = ['\\', '/', '?', '"', '<', '>', '|'];

export const INVALID_TEMPLATE_NAME_CHARS = ['"', '*', '\\', ',', '?'];
export const INVALID_TEMPLATE_NAME_CHARS = ['"', '*', '\\', ',', '?', '#'];

0 comments on commit e061949

Please sign in to comment.