Issue Bug Resolved

#111287Office documents detected as generic container MIME type are rejected

Benni Mack 10/30/26, 08:29 updated 10/30/26, 12:00

Description

Office Open XML (docx, xlsx, pptx, …) and OpenDocument files (odt, ods, odp, …) are ZIP archives, legacy Office files (doc, xls, ppt, …) are OLE compound files. Depending on the libmagic version and on the application which wrote the file, finfo detects only the container format:

- application/zip for Office Open XML and OpenDocument files
- application/x-ole-storage, application/CDFV2 or
application/vnd.ms-office for legacy Office files

As “security.system.enforceFileExtensionMimeTypeConsistency” is enabled by default, uploading such a file fails with e.g.

Mime-type “application/zip” not allowed for file extension “docx”

Reviews 2

History 17

  1. Gerrit Code Review pushed patch set 1 for main to change 97228 status New Under Review 10/30/26, 09:11

  2. Gerrit Code Review pushed patch set 2 for main to change 97228 10/30/26, 10:47

  3. Gerrit Code Review pushed patch set 1 for 14.3 to change 97234 10/30/26, 10:53

  4. Gerrit Code Review pushed patch set 2 for 14.3 to change 97234 10/30/26, 10:53

  5. Gerrit Code Review pushed patch set 3 for 14.3 to change 97234 10/30/26, 11:09

  6. Gerrit Code Review pushed patch set 4 for 14.3 to change 97234 10/30/26, 11:25

  7. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % 10/30/26, 12:00

    Applied in changeset commit:591c2bb30821bb9d2c587925b10e018af2e512c0.