]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
We only allow (and have) MIME types in supported list
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 8 Mar 2014 01:02:26 +0000 (02:02 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 8 Mar 2014 01:02:26 +0000 (02:02 +0100)
$config['attachment']['supported'] may not use only the file extension.

lib/mediafile.php

index e01d2eaeabc9b896be6f301288c5d125daceee17..a2cb21ea455467b710e55c8d31ce899a6f921c89 100644 (file)
@@ -325,15 +325,6 @@ class MediaFile
         }
 
         $supported = common_config('attachments', 'supported');
-        if (is_array($supported)) {
-            // Normalize extensions to mime types
-            foreach ($supported as $i => $entry) {
-                if (strpos($entry, '/') === false) {
-                    common_log(LOG_INFO, "sample.$entry");
-                    $supported[$i] = $mte->getMIMEType("sample.$entry");
-                }
-            }
-        }
         if ($supported === true || in_array($filetype, $supported)) {
             // Restore PEAR error handlers for our DB code...
             $_PEAR->staticPopErrorHandling();