Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution][Detection Engine] Avoid creating list items…
… for empty lines in import list API (elastic#192681) (elastic#194470) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API (elastic#192681)](elastic#192681) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marshall Main","email":"55718608+marshallmain@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-30T18:07:39Z","message":"[Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API (elastic#192681)\n\n## Summary\r\n\r\nThe quickstart tooling introduced in\r\nhttps://github.com/elastic/pull/190634 uses axios under the hood\r\nto make requests to Kibana. When attaching file data to the axios\r\nrequest with `FormData`, axios adds an extra empty line after the end\r\ncontent boundary. The logic in `buffer_lines.ts` assumes that there are\r\nno more lines after the end content boundary line, so importing a list\r\nwith the quickstart tooling would create a list with an extra empty\r\nitem. This empty item fails validation when retrieved through other\r\nAPIs.\r\n\r\nThis PR prevents lines after the end content boundary from being turned\r\ninto list items in the import list API.","sha":"5f83ac05991cd980ef5b205acd19c997b60045a3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Detection Engine","v8.16.0"],"title":"[Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API","number":192681,"url":"https://github.com/elastic/kibana/pull/192681","mergeCommit":{"message":"[Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API (elastic#192681)\n\n## Summary\r\n\r\nThe quickstart tooling introduced in\r\nhttps://github.com/elastic/pull/190634 uses axios under the hood\r\nto make requests to Kibana. When attaching file data to the axios\r\nrequest with `FormData`, axios adds an extra empty line after the end\r\ncontent boundary. The logic in `buffer_lines.ts` assumes that there are\r\nno more lines after the end content boundary line, so importing a list\r\nwith the quickstart tooling would create a list with an extra empty\r\nitem. This empty item fails validation when retrieved through other\r\nAPIs.\r\n\r\nThis PR prevents lines after the end content boundary from being turned\r\ninto list items in the import list API.","sha":"5f83ac05991cd980ef5b205acd19c997b60045a3"}},"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/192681","number":192681,"mergeCommit":{"message":"[Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API (elastic#192681)\n\n## Summary\r\n\r\nThe quickstart tooling introduced in\r\nhttps://github.com/elastic/pull/190634 uses axios under the hood\r\nto make requests to Kibana. When attaching file data to the axios\r\nrequest with `FormData`, axios adds an extra empty line after the end\r\ncontent boundary. The logic in `buffer_lines.ts` assumes that there are\r\nno more lines after the end content boundary line, so importing a list\r\nwith the quickstart tooling would create a list with an extra empty\r\nitem. This empty item fails validation when retrieved through other\r\nAPIs.\r\n\r\nThis PR prevents lines after the end content boundary from being turned\r\ninto list items in the import list API.","sha":"5f83ac05991cd980ef5b205acd19c997b60045a3"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
- Loading branch information