Bug #79681 [Com]: mime_content_type/finfo returning incorrect mimetype

From: Date: Tue, 09 Jun 2020 10:06:52 +0000
Subject: Bug #79681 [Com]: mime_content_type/finfo returning incorrect mimetype
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227371@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79681&edit=1 ID: 79681 Comment by: xandros92 at gmail dot com Reported by: xandros92 at gmail dot com Summary: mime_content_type/finfo returning incorrect mimetype Status: Feedback Type: Bug Package: *Directory/Filesystem functions Operating System: Windows 10 1909 PHP Version: 7.4.6 Assigned To: cmb Block user comment: N Private report: N New Comment: https://drive.google.com/drive/folders/1NZ48AWys6pTTvbfOoiEHXP2rLL93Tmjy?usp=sharing Previous Comments: ------------------------------------------------------------------------ [2020-06-08 12:33:58] cmb@php.net Can you please make sample.xml.gz and sample.mp3 available for download? ------------------------------------------------------------------------ [2020-06-08 11:19:20] xandros92 at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=79681&edit=1

« previous php.bugs (#227371) next »