Bug #79681 [NEW]: mime_content_type/finfo returning incorrect mimetype
| From: | xandros92 at gmail dot com | Date: | Mon, 08 Jun 2020 11:19:20 +0000 |
| Subject: | Bug #79681 [NEW]: mime_content_type/finfo returning incorrect mimetype | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227355@lists.php.net to get a copy of this message | ||
From: xandros92 at gmail dot com
Operating system: Windows 10 1909
PHP version: 7.4.6
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:mime_content_type/finfo returning incorrect mimetype
Description:
------------
After change php version from 7.3 and 7.2 to 7.4, some applications
failed validation uploaded files on mimetype. The problem exist with
some audio/mpeg and application/x-gzip.
Test script:
---------------
echo finfo_file(finfo_open(), __DIR__ . '/sample.xml.gz',
FILEINFO_MIME);
echo finfo_file(finfo_open(), __DIR__ . '/sample.mp3, FILEINFO_MIME);
Expected result:
----------------
application/x-gzip; charset=binary
audio/mpeg; charset=binary
Actual result:
--------------
application/gzip; charset=binary
application/x-font-gdos; charset=binary
--
Edit bug report at https://bugs.php.net/bug.php?id=79681&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79681&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79681&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79681&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79681&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79681&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79681&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79681&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79681&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79681&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79681&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79681&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79681&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79681&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79681&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79681&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79681&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79681&r=mysqlcfg