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

Cherry-pick #14215 to 7.5: Packetbeat: Handle ports and IPv6 in Host header #14232

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Oct 25, 2019

Cherry-pick of PR #14215 to 7.5 branch. Original message:

The http parser in Packetbeat is not correctly populating events when the host header contains a port number and/or an IPv6 address:

For "Host: elasticsearch:9200":

< "destination.domain": "elasticsearch:9200"
< "url.full": "http://[elasticsearch:9200]:9200/"
> "destination.domain": "elasticsearch"
> "url.full": "http://elasticsearch:9200/"

For "Host: [::1]":

- "destination.domain": "[::1]"
 "url.full": "http://[::1]/"

For "Host: [::1]:9200":

- "destination.domain": "[::1]:9200"
<  "url.full": "http://[[::1]:9200]:9200/"
> "url.full": "http://[::1]:9200/"

The HTTP parser in Packetbeat wasn't properly handling the hostname
and port from "Host:" header, generating wrong "destination.domain" and
"url.full" fields.

(cherry picked from commit 6acde25)
@adriansr adriansr changed the title Cherry-pick #13668 to 7.5: [Packetbeat] [HTTP] Option to use binary datatype for bodies Cherry-pick #14215 to 7.5: Packetbeat: Handle ports and IPv6 in Host header Oct 25, 2019
@adriansr adriansr merged commit 0d73699 into elastic:7.5 Oct 30, 2019
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…elastic#14232)

The HTTP parser in Packetbeat wasn't properly handling the hostname
and port from "Host:" header, generating wrong "destination.domain" and
"url.full" fields.

(cherry picked from commit e4bcff8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants