Robert has pointed out on IRC that there's a workaround listed on the PHP bug report, that involves including your own copies of the Magic DB, and checking which PHP version is running: https://bugs.php.net/bug.php?id=61940#1336148541
So, I propose this course of action:
1. We implement the workaround of including Magic DB's in the Mahara distribution itself
2. We port Moodle's Mime Type array as a fallback
3. We drop the deprecated call to mime_content_type()
4. If neither finfo nor the giant Moodle Mimetype list is able to identify the file's mimetype, we set it to the default 'application/octet-stream', and don't look at or trust the browser-supplied mimetype at all.
Robert has pointed out on IRC that there's a workaround listed on the PHP bug report, that involves including your own copies of the Magic DB, and checking which PHP version is running: https:/ /bugs.php. net/bug. php?id= 61940#133614854 1
So, I propose this course of action:
1. We implement the workaround of including Magic DB's in the Mahara distribution itself octet-stream' , and don't look at or trust the browser-supplied mimetype at all.
2. We port Moodle's Mime Type array as a fallback
3. We drop the deprecated call to mime_content_type()
4. If neither finfo nor the giant Moodle Mimetype list is able to identify the file's mimetype, we set it to the default 'application/