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 odeke-em commented Mar 19, 2019

I am coming here from CL https://go-review.googlesource.com/c/go/+/167781 created by @Gnouc'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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 19, 2019

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

@gopherbot gopherbot closed this in 349e7df Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.