]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't trust text/xml mime types; generic content detection gives useless stuff like...
authorBrion Vibber <brion@pobox.com>
Wed, 22 Dec 2010 21:56:19 +0000 (13:56 -0800)
committerBrion Vibber <brion@pobox.com>
Wed, 22 Dec 2010 21:56:19 +0000 (13:56 -0800)
lib/mediafile.php

index a41d7c76b52d190e066e3b093570b67ad08d1f26..caa902de5dfeb13c18413372769198b9af209241 100644 (file)
@@ -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);