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:6
Avg. Score:4.3 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:3 (60.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-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 08:05:54 2022 UTC