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

net/http: invalid RAR sniff signature from the MIME Sniff spec #30926

Closed
odeke-em opened this issue Mar 19, 2019 · 1 comment
Closed

net/http: invalid RAR sniff signature from the MIME Sniff spec #30926

odeke-em opened this issue Mar 19, 2019 · 1 comment
Milestone

Comments

@odeke-em
Copy link
Member

odeke-em commented Mar 19, 2019

I am coming here from CL https://go-review.googlesource.com/c/go/+/167781 created by @cuonglm's vigilance.

In particular it uses a wrong character for the 4th byte i.e.
0x20 " " for both RAR v5 and RAR v4 instead of 0x21 "!"

as per

go/src/net/http/sniff.go

Lines 188 to 189 in faa7fa0

&exactSig{[]byte("Rar \x1A\x07\x00"), "application/x-rar-compressed"}, // RAR v1.5-v4.0
&exactSig{[]byte("Rar \x1A\x07\x01\x00"), "application/x-rar-compressed"}, // RAR v5+

The sniff signature that we got from the MIME sniff spec is wrong and that's acknowledged at
whatwg/mimesniff#63
but also the official RAR Labs website shows the correct signature as
https://www.rarlab.com/technote.htm#rarsign

@odeke-em odeke-em added this to the Go1.13 milestone Mar 19, 2019
@gopherbot
Copy link

Change https://golang.org/cl/167781 mentions this issue: net/http: fix wrong mime rar signature

@golang golang locked and limited conversation to collaborators Mar 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants