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

PDF magic in 0.1.8 is too loose #4

Closed
bronson opened this Issue Jun 3, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@bronson
Contributor

bronson commented Jun 3, 2011

I'm stuck on mimemagic 0.1.7 because of the new PDF magic.

This change is the problem:

-    ['application/pdf', [[0, "%PDF-"]]],
+    ['application/pdf', [[0..1024, "%PDF-"]]],

Turns out LOTS of files have %PDF- in the first 1024 bytes. Here are two:

Is there a way to report this broken magic upstream?

(I originally commented on the commit)

@minad

This comment has been minimized.

Show comment
Hide comment
@minad

minad Jun 3, 2011

Owner

The magic file is automatically generated from the freedesktop mime database. But it might be possible to add a "patch table file" which won't be overwritten when the magic database is updated. Patches welcome!

Owner

minad commented Jun 3, 2011

The magic file is automatically generated from the freedesktop mime database. But it might be possible to add a "patch table file" which won't be overwritten when the magic database is updated. Patches welcome!

@bronson

This comment has been minimized.

Show comment
Hide comment
@bronson

bronson Jun 3, 2011

Contributor

Is there any way to tell FreeDesktop that their mime database is broken? It seems best to fix the problem at the source.

If not then I guess a patch table is the way to go. It would fix the other open issue too.

Contributor

bronson commented Jun 3, 2011

Is there any way to tell FreeDesktop that their mime database is broken? It seems best to fix the problem at the source.

If not then I guess a patch table is the way to go. It would fix the other open issue too.

@minad

This comment has been minimized.

Show comment
Hide comment
@minad

minad Mar 21, 2015

Owner

Still an issue?

We now have mimemagic/overlay, but I would prefer upstream fixes.

Owner

minad commented Mar 21, 2015

Still an issue?

We now have mimemagic/overlay, but I would prefer upstream fixes.

@minad minad closed this Mar 21, 2015

@bronson

This comment has been minimized.

Show comment
Hide comment
@bronson

bronson Oct 7, 2016

Contributor

Hi, sorry I missed this. Yep, still an issue:

https://github.com/minad/mimemagic/blob/master/lib/mimemagic/tables.rb#L1522

I'll add an overlay if needed, thanks! So far, remaining on 0.1.7 has been fine.

Contributor

bronson commented Oct 7, 2016

Hi, sorry I missed this. Yep, still an issue:

https://github.com/minad/mimemagic/blob/master/lib/mimemagic/tables.rb#L1522

I'll add an overlay if needed, thanks! So far, remaining on 0.1.7 has been fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment