[Mediawiki-l] Uploading office docs

nakohdo Frank.Ralf at gmx.net
Fri Mar 11 09:04:11 UTC 2011



Sullivan, James (NIH/CIT) [C] wrote:
> 
> This is a known problem but I'm not sure where Mediawiki.org is on fixing
> it or whether they are attempting to fix it, though I have heard rumors of
> a fix in 1.17.  The problem stems from Microsoft (surprise!) having
> changed its format for Office 7 documents.  Its format gives its files a
> mime-type of a zip file, so when Mediawiki checks the file it sees a docx
> extension but when it looks at the mime-type of the file (a binary string
> near the beginning of the file) it sees what appears to be a zip file. 
> Thus the "corruption".  These checks help prevent users from uploading
> malicious files with innocent looking extensions, like uploading a nasty
> zip file with a jpg extension for example.
> 

Well, like OpenOffice.org's Open Document Format
(http://en.wikipedia.org/wiki/OpenDocument) Microsoft DOCX files ARE zip
files, only with the "wrong" file extension. You can check this by changing
the extension to ".zip" and opening it with your favorite zip program. In
fact, it's an XML based file format like ODF.

(BTW this is no malevolence on the part of Microsoft but its response to the
request to provide an open XML based file format instead of its own binary
formats.)

A workaround for the problem at hand might be to make docx files "real" zip
files by zipping them before uploading. You can coax MediaWiki to upload any
file type this way.

hth
Frank




 
-- 
View this message in context: http://old.nabble.com/Uploading-office-docs-tp31112507p31123119.html
Sent from the WikiMedia General mailing list archive at Nabble.com.




More information about the MediaWiki-l mailing list