php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78075 finfo_file treats JSON file as text/plain
Submitted: 2019-05-27 11:47 UTC Modified: 2019-05-30 12:01 UTC
From: testmail dot team5 at gmail dot com Assigned: ab (profile)
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 7.2.18 OS: Windows 10
Private report: No CVE-ID: None
 [2019-05-27 11:47 UTC] testmail dot team5 at gmail dot com
Description:
------------
finfo_file treats JSON file as text/plain

Test script:
---------------
https://3v4l.org/iteti

Expected result:
----------------
application/json

Actual result:
--------------
text/plain

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-28 09:34 UTC] ab@php.net
Thanks for the report. This has been fixed in latest libmagic versions afaik, so stay tuned for 7.4 when the new libmagic port lands. Beyond that - json in the snippet is invalid.

Thanks.
 [2019-05-28 09:35 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2019-05-30 12:01 UTC] ab@php.net
-Status: Assigned +Status: Closed
 [2019-05-30 12:01 UTC] ab@php.net
Fixed in 7.4. Please check the latest snapshots.

Thanks.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 04:01:25 2019 UTC