mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 03:24:20 +02:00
Checking of remote file-types during import and other cleanup.
This commit is contained in:
@@ -2486,7 +2486,11 @@ class media_admin_ui extends e_admin_ui
|
||||
$fileName = empty($uploadCaption) ? str_replace(array('.php', '.html', '.asp', '.htm'),'',$fileName). '_' .time() : eHelper::dasherize(strtolower($uploadCaption));
|
||||
}
|
||||
|
||||
if(!$fl->getRemoteFile($tp->filter($_POST['upload_url'], 'url'), $fileName, 'import'))
|
||||
if(!$fl->isAllowedType($_POST['upload_url']))
|
||||
{
|
||||
$mes->addError(defset('IMALAN_190', "Importing of this file-type is not allowed."));
|
||||
}
|
||||
elseif(!$fl->getRemoteFile($tp->filter($_POST['upload_url'], 'url'), $fileName, 'import'))
|
||||
{
|
||||
$mes->addError(IMALAN_176);
|
||||
}
|
||||
|
Reference in New Issue
Block a user