Browse Source

Disable over-eagerly MSOOXML detection. Closes: #1138991

Christoph Biedl 1 day ago
parent
commit
87e55cf166

+ 1 - 0
debian/patches/series

@@ -11,6 +11,7 @@ cherry-pick/FILE5_47-93-g7a2b2a4b.handle-parsing-guids-in-big-endian-machines.pa
 # patches that should go upstream
 # patches that should go upstream
 upstream/disable.att3b.patch
 upstream/disable.att3b.patch
 upstream/stricter-postscript-magic.patch
 upstream/stricter-postscript-magic.patch
+upstream/disable-over-eagerly-msooxml-detection.patch
 
 
 # local modifications
 # local modifications
 local/support-local-definitions-in-etc-magic.patch
 local/support-local-definitions-in-etc-magic.patch

+ 25 - 0
debian/patches/upstream/disable-over-eagerly-msooxml-detection.patch

@@ -0,0 +1,25 @@
+Subject: Disable over-eagerly MSOOXML detection
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2026-06-06
+Bug-Debian: https://bugs.debian.org/1138991
+Forwarded: https://mailman.astron.com/pipermail/file/2026-June/001674.html
+
+    Upstream commit FILE5_46-106-g8cef37b5 ("PR/0644: omajid: Recognize
+    NuGet packages") enhanced the list of what files in the listing in a
+    ZIP archive might be an MS OOXML file. The rationale is not clear,
+    but under some circumstances this causes ZIP files to be
+    mis-detected.
+
+    Revert this part of the above commit for the time being.
+
+--- a/magic/Magdir/msooxml
++++ b/magic/Magdir/msooxml
+@@ -35,7 +35,7 @@
+ # make sure the first file is correct
+ >0x1E		use		msooxml
+ >0x1E		default		x
+->>0x1E		regex		\\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml|.*\\.md|.*\\.png
++>>0x1E		regex		\\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml
+ # skip to the second local file header
+ # since some documents include a 520-byte extra field following the file
+ # header, we need to scan for the next header