Add max character validation to the email connector params and config#246453
Add max character validation to the email connector params and config#246453ersin-erdal merged 10 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts
Outdated
Show resolved
Hide resolved
src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts
Outdated
Show resolved
Hide resolved
src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/index.test.ts
Show resolved
Hide resolved
|
|
||
| function validateParams(paramsObject: unknown, validatorServices: ValidatorServices) { | ||
| const { configurationUtilities } = validatorServices; | ||
| const emailValidator = z.array(z.string().max(512)).max(100); |
There was a problem hiding this comment.
can we reuse emailSchema from kbn-connector-schemas?
There was a problem hiding this comment.
I didn't use them intentionally since they are versioned schema.
We can use it from the latest version but a new version would affect here too.
Should we?
There was a problem hiding this comment.
I think it's ok to use the latest
💚 Build Succeeded
Metrics [docs]
History
|
|
Starting backport for target branches: 8.19, 9.1, 9.2, 9.3 |
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co> (cherry picked from commit 0621884)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…config (#246453) (#247600) # Backport This will backport the following commits from `main` to `9.3`: - [Add max character validation to the email connector params and config (#246453)](#246453) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-30T11:18:55Z","message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport:all-open","v9.4.0"],"title":"Add max character validation to the email connector params and config","number":246453,"url":"https://github.com/elastic/kibana/pull/246453","mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246453","number":246453,"mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}}]}] BACKPORT--> Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com> Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co> (cherry picked from commit 0621884) # Conflicts: # src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts # x-pack/platform/plugins/shared/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co> (cherry picked from commit 0621884) # Conflicts: # src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts # x-pack/platform/plugins/shared/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co> (cherry picked from commit 0621884) # Conflicts: # src/platform/packages/shared/kbn-connector-schemas/email/schemas/v1.ts # x-pack/platform/plugins/shared/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap
… config (#246453) (#247642) # Backport This will backport the following commits from `main` to `8.19`: - [Add max character validation to the email connector params and config (#246453)](#246453) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-30T11:18:55Z","message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport:all-open","v9.3.0","v9.4.0"],"title":"Add max character validation to the email connector params and config","number":246453,"url":"https://github.com/elastic/kibana/pull/246453","mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/247600","number":247600,"state":"MERGED","mergeCommit":{"sha":"c5d5d8697c5d6d5ddd214c2deab73d7f7404659e","message":"[9.3] Add max character validation to the email connector params and config (#246453) (#247600)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.3`:\n- [Add max character validation to the email connector params and config\n(#246453)](https://github.com/elastic/kibana/pull/246453)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>"}},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246453","number":246453,"mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}}]}] BACKPORT-->
…config (#246453) (#247640) # Backport This will backport the following commits from `main` to `9.1`: - [Add max character validation to the email connector params and config (#246453)](#246453) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-30T11:18:55Z","message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport:all-open","v9.3.0","v9.4.0"],"title":"Add max character validation to the email connector params and config","number":246453,"url":"https://github.com/elastic/kibana/pull/246453","mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/247600","number":247600,"state":"MERGED","mergeCommit":{"sha":"c5d5d8697c5d6d5ddd214c2deab73d7f7404659e","message":"[9.3] Add max character validation to the email connector params and config (#246453) (#247600)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.3`:\n- [Add max character validation to the email connector params and config\n(#246453)](https://github.com/elastic/kibana/pull/246453)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>"}},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246453","number":246453,"mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}}]}] BACKPORT-->
…config (#246453) (#247637) # Backport This will backport the following commits from `main` to `9.2`: - [Add max character validation to the email connector params and config (#246453)](#246453) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-30T11:18:55Z","message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport:all-open","v9.3.0","v9.4.0"],"title":"Add max character validation to the email connector params and config","number":246453,"url":"https://github.com/elastic/kibana/pull/246453","mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/247600","number":247600,"state":"MERGED","mergeCommit":{"sha":"c5d5d8697c5d6d5ddd214c2deab73d7f7404659e","message":"[9.3] Add max character validation to the email connector params and config (#246453) (#247600)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.3`:\n- [Add max character validation to the email connector params and config\n(#246453)](https://github.com/elastic/kibana/pull/246453)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>"}},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246453","number":246453,"mergeCommit":{"message":"Add max character validation to the email connector params and config (#246453)\n\nThis PR adds length validation to the email params to prevent crushing\nerrors.\n\n---------\n\nCo-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>","sha":"06218847e4528caf724a541d9443c02339001982"}}]}] BACKPORT-->
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
…elastic#246453) This PR adds length validation to the email params to prevent crushing errors. --------- Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
This PR adds length validation to the email params to prevent crushing errors.