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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 15 = ?
Subscribe to this entry?

 
 [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-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 28 08:01:28 2020 UTC