View Issue Details

IDProjectCategoryView StatusLast Update
0000510fileGeneralpublic2024-04-08 15:58
Reportera1rind Assigned Tochristos  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.44 
Fixed in VersionHEAD 
Summary0000510: docx file is determined as zip
DescriptionHi!

An OOXML format docx file (attached) is being determined as an application/zip.

The `zipinfo` lists the following directories/files:

```
Zip file size: 46058 bytes, number of entries: 36
-rw---- 0.0 fat 3016 b- stor 80-Jan-01 00:00 [Content_Types].xml
-rw---- 0.0 fat 646372 t- defN 80-Jan-01 00:00 word/styles.xml
-rw---- 0.0 fat 64407 t- defN 80-Jan-01 00:00 word/numbering.xml
-rw---- 0.0 fat 1222 t- defN 80-Jan-01 00:00 word/fontTable.xml
-rw---- 0.0 fat 8901 t- defN 80-Jan-01 00:00 word/header1.xml
-rw---- 0.0 fat 4411 t- defN 80-Jan-01 00:00 word/header2.xml
-rw---- 0.0 fat 4411 t- defN 80-Jan-01 00:00 word/header3.xml
-rw---- 0.0 fat 2420 t- defN 80-Jan-01 00:00 word/footer1.xml
-rw---- 0.0 fat 1743 t- defN 80-Jan-01 00:00 word/footnotes.xml
-rw---- 0.0 fat 1737 t- defN 80-Jan-01 00:00 word/endnotes.xml
-rw---- 0.0 fat 2377 t- defN 80-Jan-01 00:00 word/settings.xml
-rw---- 0.0 fat 183 t- defN 80-Jan-01 00:00 word/webSettings.xml
-rw---- 0.0 fat 58909 t- defN 80-Jan-01 00:00 word/document.xml
-rw---- 0.0 fat 739 t- defN 80-Jan-01 00:00 _rels/.rels
-rw---- 0.0 fat 218 t- defN 80-Jan-01 00:00 customXml/itemProps1.xml
-rw---- 0.0 fat 11932 t- defN 80-Jan-01 00:00 customXml/item1.xml
-rw---- 0.0 fat 218 t- defN 80-Jan-01 00:00 customXml/itemProps2.xml
-rw---- 0.0 fat 587 t- defN 80-Jan-01 00:00 customXml/item2.xml
-rw---- 0.0 fat 218 t- defN 80-Jan-01 00:00 customXml/itemProps3.xml
-rw---- 0.0 fat 219 t- defN 80-Jan-01 00:00 customXml/item3.xml
-rw---- 0.0 fat 501 t- defN 80-Jan-01 00:00 docProps/app.xml
-rw---- 0.0 fat 712 t- defN 80-Jan-01 00:00 docProps/core.xml
-rw---- 0.0 fat 591 t- defN 80-Jan-01 00:00 docProps/custom.xml
-rw---- 0.0 fat 155 t- defN 80-Jan-01 00:00 word/_rels/comments.xml.rels
-rw---- 0.0 fat 155 t- defN 80-Jan-01 00:00 word/_rels/header1.xml.rels
-rw---- 0.0 fat 287 t- defN 80-Jan-01 00:00 word/_rels/header2.xml.rels
-rw---- 0.0 fat 287 t- defN 80-Jan-01 00:00 word/_rels/header3.xml.rels
-rw---- 0.0 fat 155 t- defN 80-Jan-01 00:00 word/_rels/footer1.xml.rels
-rw---- 0.0 fat 155 t- defN 80-Jan-01 00:00 word/_rels/footnotes.xml.rels
-rw---- 0.0 fat 155 t- defN 80-Jan-01 00:00 word/_rels/endnotes.xml.rels
-rw---- 0.0 fat 2662 t- defN 80-Jan-01 00:00 word/_rels/document.xml.rels
-rw---- 0.0 fat 680 b- defN 80-Jan-01 00:00 word/media/image1.wmf
-rw---- 0.0 fat 4569 t- defN 80-Jan-01 00:00 word/theme/theme1.xml
-rw---- 0.0 fat 295 t- defN 80-Jan-01 00:00 customXml/_rels/item1.xml.rels
-rw---- 0.0 fat 295 t- defN 80-Jan-01 00:00 customXml/_rels/item2.xml.rels
-rw---- 0.0 fat 295 t- defN 80-Jan-01 00:00 customXml/_rels/item3.xml.rels
36 files, 826189 bytes uncompressed, 41764 bytes compressed: 94.9%
```

It was tested on Debian Bookworm using file version 5.44. Also, when using the latest msooxml file (https://github.com/file/file/blob/master/magic/Magdir/msooxml,), the content type is not correctly determined. Can you suggest rules that should be updated in msooxml to fix this?

Any help in this regard is highly appreciated.

Kind Regards!
Aamir
Steps To Reproducefile --mime-type unsupported.docx
Tagsbug, magic

Activities

a1rind

2024-03-18 12:46

reporter  

unsupported.docx (46,058 bytes)

a1rind

2024-03-21 16:27

reporter   ~0004024

Do the rules defined in msooxml depend on the order of the files in an OOXML document?

christos

2024-04-08 15:58

manager   ~0004030

Fixed, thanks

Issue History

Date Modified Username Field Change
2024-03-18 12:46 a1rind New Issue
2024-03-18 12:46 a1rind Tag Attached: bug
2024-03-18 12:46 a1rind Tag Attached: magic
2024-03-18 12:46 a1rind File Added: unsupported.docx
2024-03-21 16:27 a1rind Note Added: 0004024
2024-04-08 15:56 christos Assigned To => christos
2024-04-08 15:56 christos Status new => assigned
2024-04-08 15:58 christos Status assigned => resolved
2024-04-08 15:58 christos Resolution open => fixed
2024-04-08 15:58 christos Fixed in Version => HEAD
2024-04-08 15:58 christos Note Added: 0004030