forked from GNUsocial/gnu-social
Don't trust text/xml mime types; generic content detection gives useless stuff like that on SVG images! Todo: replace the extension check in this case with better content-based checks.
This commit is contained in:
parent
35d9a065fb
commit
464e0f8115
@ -362,7 +362,9 @@ class MediaFile
|
||||
// we'll try detecting a type from its extension...
|
||||
$unclearTypes = array('application/octet-stream',
|
||||
'application/vnd.ms-office',
|
||||
'application/zip');
|
||||
'application/zip',
|
||||
// TODO: for XML we could do better content-based sniffing too
|
||||
'text/xml');
|
||||
|
||||
if ($originalFilename && (!$filetype || in_array($filetype, $unclearTypes))) {
|
||||
$type = $mte->getMIMEType($originalFilename);
|
||||
|
Loading…
Reference in New Issue
Block a user