Bug #64462 [Opn->Fbk]: Bug in libmagic included with fileinfo extension
Edit report at https://bugs.php.net/bug.php?id=64462&edit=1
ID: 64462
Updated by: ab@php.net
Reported by: vitalif at mail dot ru
Summary: Bug in libmagic included with fileinfo extension
-Status: Open
+Status: Feedback
Type: Bug
Package: Filesystem function related
PHP Version: 5.5.0alpha5
-Assigned To:
+Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Thanks for the patch. We use libmagic 5.11 which is about one year old. You're right, it could
be upgraded. Most our fixes related to it are PHP specific.
It would be nice if you'd submit a testcase for this, furthermore it's essential. That
will be useful now to test this patch and later after upgrade.
Previous Comments:
------------------------------------------------------------------------
[2013-03-20 12:05:41] vitalif at mail dot ru
Description:
------------
Hello!
First of all I want to say that libmagic included with fileinfo extension is 2 YEARS OLD and has
bugs - you should UPDATE it to something like 5.13. Also it would be good if you submit your
libmagic fixes to UPSTREAM (to libmagic author) - at least some of them.
And also I want to tell you about a specific bug - your libmagic detects all MSOffice documents
unknown to it as "application/msword". For example, any Visio (CDF) document is detected
as "application/msword", which is incorrect. This bug was in libmagic 5.11, but is already
fixed in 5.13.
I would propose updating the included libmagic, but if you don't want to do it you can just
apply a simple patch (attached). With it Visio and all other unknown files are detected as
application/vnd.ms-office which is more correct.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64462&edit=1
Thread (5 messages)