Saw this on facebook earlier today and then 10 minutes later had the same error report from a client
When opening media manager
Error Property 'mime_type' of argument 'item' of event onFetchMediaItems has a wrong item. Valid: string
The problem is caused if php does not have fileinfo module.
I am fine with that being a requirement but it needs to have better error messages
Labels |
Added:
No Code Attached Yet
|
Personally I am file with fileinfo being a requirement as long as there is a more helpful error message
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-02 13:56:05 |
Closed_By | ⇒ | brianteeman |
Status | Closed | ⇒ | New |
Closed_Date | 2023-02-02 13:56:05 | ⇒ | |
Closed_By | brianteeman | ⇒ |
Labels |
Added:
bug
|
based upon on how much php stack in the wild, lacks of phpfileinfo module
we should choose our poison
i don't like to introduce dependencies if it can be avoided
better to document this "hard" requirement ?
When I was coding #39586 I noted that the code for extracting the
mime_type
could be improved with the simple installation of one of the most popular composer packages (my preference is https://github.com/thephpleague/mime-type-detection but the most popular is the symphony one: https://packagist.org/packages/symfony/mime). On another project to strengthen security we sniff the extension from the file header bytes with some code like: https://gist.github.com/GiantZOC/db1d30b31ffb9d8ca73b6c4f4fe991df#file-mimetypeverification-js-L30-L80 and my recommendation would be that Joomla should also follow the same path. The fileinfo module then might not be a hard dependency.