https://bugzilla.wikimedia.org/show_bug.cgi?id=23642

--- Comment #13 from Derk-Jan Hartman <[email protected]> 2010-06-19 
03:47:49 CEST ---
Created an attachment (id=7484)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=7484)
Detect mime types for openxml files

This is my idea for fixing this problem.

I introduce a new mime type. This is application/x-opc+zip
This mimetype basically means "Open Packaging Conventions" archive and is a
private mimetype that I came up with.

When initially checking for mimetype, we detect that this is an OPC file, and
we use the extension to guess what type of OPC file. Then on the verify pass
(where guessing based on extension is not allowed), we detect that the file is
an OPC archive. We then check if the file extension (docx for instance) is an
allowed file extension for this filetype, and we check if opc files are on the
mime blacklist.

File entries are stored into the database with their 'proper' MS Office
mimetype. Normally the OPC filetype should not ever be served, unless people
disable mimeverification.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to