php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80594 MP3 file detected as application/x-font-gdos
Submitted: 2021-01-05 15:48 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: cmb@php.net Assigned:
Status: Open Package: Filesystem function related
PHP Version: 7.4.14RC1 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-01-05 15:48 UTC] cmb@php.net
Description:
------------
I'm forwarding this from another ticket[1].

A sample MP3 file[2] is erroneously detected as
application/x-font-gdos instead of audio/mpeg with PHP-7.4, but
not with PHP-7.3 nor PHP-8.0.

[1] <https://bugs.php.net/79681#1605807139>
[2] <https://drive.google.com/file/d/1QrF9iZBjmfgZGvOjrSVORfM6uI-nyidX/view?usp=sharing>


Test script:
---------------
<?php

var_dump(mime_content_type('test_file.mp3'));


Expected result:
----------------
string(10) "audio/mpeg"


Actual result:
--------------
string(23) "application/x-font-gdos"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 21:01:24 2021 UTC