-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[filebeat] aws-s3 input falsely detects gzip file as a font #29968
Labels
Comments
botelastic
bot
added
the
needs_team
Indicates that the issue/PR needs a Team:* label
label
Jan 24, 2022
This issue doesn't have a |
andrewkroh
added a commit
to andrewkroh/beats
that referenced
this issue
Jan 24, 2022
Directly check the byte stream for the gzip magic number and deflate compression type. Avoid using http.DetectContentType because it returns the first match it finds while checking many signatures. Closes elastic#29968
6 tasks
andrewkroh
added a commit
that referenced
this issue
Jan 24, 2022
Directly check the byte stream for the gzip magic number and deflate compression type. Avoid using http.DetectContentType because it returns the first match it finds while checking many signatures. Closes #29968
andrewkroh
added a commit
that referenced
this issue
Jan 24, 2022
…29975) Directly check the byte stream for the gzip magic number and deflate compression type. Avoid using http.DetectContentType because it returns the first match it finds while checking many signatures. Closes #29968 (cherry picked from commit 61a7d36) Co-authored-by: Andrew Kroh <[email protected]>
andrewkroh
added a commit
that referenced
this issue
Jan 24, 2022
…29974) Directly check the byte stream for the gzip magic number and deflate compression type. Avoid using http.DetectContentType because it returns the first match it finds while checking many signatures. Closes #29968 (cherry picked from commit 61a7d36) Co-authored-by: Andrew Kroh <[email protected]>
yashtewari
pushed a commit
to build-security/beats
that referenced
this issue
Jan 30, 2022
…29969) Directly check the byte stream for the gzip magic number and deflate compression type. Avoid using http.DetectContentType because it returns the first match it finds while checking many signatures. Closes elastic#29968
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The aws-s3 input can fail to properly detect gzip files. We have a file that is falsely matched as application/vnd.ms-fontobject by https://pkg.go.dev/net/http#DetectContentType. I think we can replace the usage of that stdlib method with a more direct gzip magic number check. This would avoid the chance of falsely matching other signatures that are listed before gzip.
The text was updated successfully, but these errors were encountered: