Bug 96660 - ZIP archive detected by content as PDF
Summary: ZIP archive detected by content as PDF
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Shared Mime Info group
QA Contact:
: 96266 (view as bug list)
Depends on:
Reported: 2016-06-23 18:21 UTC by Stefan Radermacher
Modified: 2016-07-08 10:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Stefan Radermacher 2016-06-23 18:21:55 UTC
This is similar to bug 92549, but for zip archives. Some zip archives that contain PDF files are detected as PDF instead of zip. I can't provide a sample unfortunately, as the affected archives I have contain watermarked files I cannot pass on.
Comment 1 Bastien Nocera 2016-06-24 02:47:08 UTC
Could you please send those to me privately by mail if at all possible?
Comment 2 Stefan Radermacher 2016-06-24 10:30:13 UTC
I've sent you an affected file by email
Comment 3 Stefan Radermacher 2016-06-24 10:52:46 UTC
Just noticed that my reference to the RAR bug had a typo. This correct link is bug 93549.
Comment 4 Bastien Nocera 2016-06-24 11:15:46 UTC
commit 19d6683981803aeb773daeea0fbf507872877fe4
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Jun 24 13:13:15 2016 +0200

    Fix misdetection of zip files as their content
    Bump application/zip priority so that if the file is a PDF inside a zip
    file, we don't have a toss up between those 2 to know which mime-type it
    actually is.
    Prefer the application/zip rather than whatever is inside.
    But that means that all the priorities for the application/zip sub-types
    magic need to be bumped to be higher than application/zip, so they are
    detected as that type rather than zip.
    In short: application/zip magic priority raised to 60
    application/zip sub-types magic priorities raised to 70
    This is similar to the fix in 10fc17e

commit b453fc2c203b82b200a086dde1090b7d5b9e028d
Author: Bastien Nocera <hadess@hadess.net>
Date:   Fri Jun 24 13:12:41 2016 +0200

    Add missing subclass statement for OpenRaster files
    They're zip files, so mark them as such.
Comment 5 Bastien Nocera 2016-07-08 10:51:21 UTC
*** Bug 96266 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.