[File] Regression introduced by nuget detection

Christoph Biedl astron.com.bwoj at manchmal.in-ulm.de
Sat Jun 6 08:09:36 EDT 2026


As I learned in Debian#1138991¹, plain .zip files are sometimes
mis-detected as Microsoft OOXML. Bisecting led to

| https://github.com/file/file/commit/FILE5_46-106-g8cef37b5
| commit 8cef37b568008dceaae5b6ac1ee37827310da394
| Author: Christos Zoulas <christos at zoulas.com>
| Date:   Thu May 29 15:03:04 2025 +0000
|
|     PR/0644: omajid: Recognize NuGet packages

If I understand correctly, the problematic part is the extension to the
search pattern:

->>0x1E         regex           \\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml
+>>0x1E         regex           \\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml|.*\\.md|.*\\.png

This looks like an unrelated change, none of the very few nuget files
I've checked contain a .png or .md file. At the same time however, I
reckon this will detect all (some?) .zip archives containing such a file
as Microsoft OOXML.

Can you please check?

    Christoph

¹ https://bugs.debian.org/1138991


More information about the File mailing list