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
x-pack/filebeat/input/httpjson: fix relation parameter handling in getRFC5988Link #34622
Conversation
ff4e493
to
0dcd7db
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This pull request is now in conflicts. Could you fix it? 🙏
|
Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ink (#34622) Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements. (cherry picked from commit ba67aa8)
…ink (#34622) Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements. (cherry picked from commit ba67aa8)
…ink (#34622) (#34867) Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements. (cherry picked from commit ba67aa8) Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
…parameter handling in getRFC5988Link (#34868) * x-pack/filebeat/input/httpjson: fix relation parameter in getRFC5988Link (#34622) Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements. (cherry picked from commit ba67aa8) * remove irrelevant changelog lines * use common.MapStr * adjust test for previous split behaviour Between 7.17 and 8.6, the capacity to split link headers from single strings was added, so make each link a single string --------- Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
…ink (#34622) Previously the regular expression required a space separating the "ral" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation. The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements.
What does this PR do?
Previously the regular expression required a space separating the "rel" tag from previous text. While the examples in RFC5988 show a separating space, the ABNF does not indicate a requirement; the space that does exist in the examples is allowed by RFC2616 because of the implied *LWS rule for token separation.
The new regular expression also more carefully considers quoting for rel parameters and semicolon requirements.
Why is it important?
The existing code rejects valid links.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs