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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC