mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #17954
[Bug 1302251] Re: MS Office files being seen as zip archives
The current workaround is to disable fileinfo. You can do this by
setting $cfg->pathtomagicdb to boolean false. However, if you've got the
mime_content_type PHP library installed, it'll fall back to that as
well, and that also identifies docx files as ZIP files. So what you have
to do is apply an invalid pathtomagicdb value. This will cause Mahara to
attempt to use fileinfo, fail, and fall back to identifying the filetype
based on its file extension.
So to do that, you would put something like this in your config.php:
$cfg->pathtomagicdb = '/dev/null';
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1302251
Title:
MS Office files being seen as zip archives
Status in Mahara ePortfolio:
Confirmed
Bug description:
Now that we've got file_mime_type() working with the PHP fileinfo
library correctly, it has caused a problem. Microsoft Office 2007+
"docx" files are recognized as zip archives by fileinfo!
So when users upload a .docx file into Mahara, they see a ZIP icon,
and they have the option to decompress the archive. Which they should
not.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1302251/+subscriptions
References