Filter out bad MIME types from fileopen.php and share allowable array with filesave.php
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2617 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -9,13 +9,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
$allowedMimeTypesBySuffix = array(
|
||||
'svg' => 'image/svg+xml',
|
||||
'png' => 'image/png',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'bmp' => 'image/bmp',
|
||||
'webp' => 'image/webp'
|
||||
);
|
||||
require('allowedMimeTypes.php');
|
||||
|
||||
$mime = !isset($_POST['mime']) || !in_array($_POST['mime'], $allowedMimeTypesBySuffix) ? 'image/svg+xml' : $_POST['mime'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user