php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77346 webm files incorrectly detected as application/octet-stream
Submitted: 2018-12-26 14:31 UTC Modified: 2018-12-26 22:57 UTC
From: kieran at miami-nice dot co dot uk Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 7.3.0 OS:
Private report: No CVE-ID: None
 [2018-12-26 14:31 UTC] kieran at miami-nice dot co dot uk
Description:
------------
PHP 7.3.0 is returning different output in some cases for mime_content_type lookups. I believe it comes from changes in https://bugs.php.net/bug.php?id=77095 or https://github.com/php/php-src/search?q=magic+data&type=Commits

Test script:
---------------
https://hastebin.com/edoyopagaf.xml

Expected result:
----------------
$ php7.3 test.php
video/webm

Actual result:
--------------
$ php7.3 -v
PHP 7.3.0-2+0~20181217092615.24+jessie~1.gbp54e52f (cli) (built: Dec 17 2018 17:27:47) ( NTS )
$ php7.3 test.php
application/octet-stream

$ php7.2 -v
PHP 7.2.11-2+0~20181015120510.9+jessie~1.gbp8105e0 (cli) (built: Oct 16 2018 03:39:58) ( NTS )
$ php7.2 test.php
video/webm

$ php7.1 -v
PHP 7.1.23-2+0~20181017082658.9+jessie~1.gbpab65a0 (cli) (built: Oct 17 2018 12:02:25) ( NTS )
$ php7.1 test.php
video/webm




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-26 22:57 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-12-26 22:57 UTC] cmb@php.net
This regression has been introduced when porting libmagic 5.33[1].

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e2182a1ba7cdd3c915cf29cd8367a6e02a0c10c8>
 [2018-12-28 12:28 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d874d4a15c2e17a753d580691906c95e9153b823
Log: Fixed bug #77346 webm files incorrectly detected as application/octet-stream
 [2018-12-28 12:28 UTC] ab@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun May 26 04:01:27 2019 UTC