Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [Security Solution][Detection Engine] Avoid creating list items for empty lines in import list API (#192681) #194470

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…mpty lines in import list API (elastic#192681)

## Summary

The quickstart tooling introduced in
elastic#190634 uses axios under the hood
to make requests to Kibana. When attaching file data to the axios
request with `FormData`, axios adds an extra empty line after the end
content boundary. The logic in `buffer_lines.ts` assumes that there are
no more lines after the end content boundary line, so importing a list
with the quickstart tooling would create a list with an extra empty
item. This empty item fails validation when retrieved through other
APIs.

This PR prevents lines after the end content boundary from being turned
into list items in the import list API.

(cherry picked from commit 5f83ac0)
@kibanamachine kibanamachine merged commit 4c6f2e9 into elastic:8.x Sep 30, 2024
31 checks passed
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @marshallmain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants