We only allow (and have) MIME types in supported list
$config['attachment']['supported'] may not use only the file extension.
This commit is contained in:
parent
6f6065e5e9
commit
0eb38b8f84
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user