Skip to content

Fix detection of file types a bit#1243

Merged
nickvergessen merged 3 commits into
masterfrom
fix-detection-of-file-types-a-bit
Sep 8, 2016
Merged

Fix detection of file types a bit#1243
nickvergessen merged 3 commits into
masterfrom
fix-detection-of-file-types-a-bit

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

@icewind1991 Do you have any better idea?

@oparoz @LukasReschke

@mention-bot

Copy link
Copy Markdown

@nickvergessen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @icewind1991, @rullzer and @tanghus to be potential reviewers

@oparoz

oparoz commented Sep 2, 2016

Copy link
Copy Markdown
Member

What happens if the media type is not application/octet-stream, but application/x-zip-compressed? Wouldn't it bypass the new test?

@nickvergessen

nickvergessen commented Sep 2, 2016

Copy link
Copy Markdown
Member Author

Well you can use regex to match that

So instead of blocking is application/zip you block matches /^application\/(.*)zip(.*)$/i or matches /^application\/(zip|x-zip-compressed)$/i

@nickvergessen nickvergessen force-pushed the fix-detection-of-file-types-a-bit branch from a5b4df4 to 2d61ee3 Compare September 5, 2016 07:48
@oparoz

oparoz commented Sep 5, 2016

Copy link
Copy Markdown
Member

I'll add something to the doc.

@oparoz

oparoz commented Sep 5, 2016

Copy link
Copy Markdown
Member

@rullzer

rullzer commented Sep 6, 2016

Copy link
Copy Markdown
Member

LGTM

@nickvergessen

Copy link
Copy Markdown
Member Author

Second +1 so we can do the backport to 10? @MorrisJobke @oparoz @LukasReschke

@LukasReschke

Copy link
Copy Markdown
Member

LGTM

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.

5 participants