mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Remove all calls to checkUploadedFile()
This commit is contained in:
parent
37c07f7b6e
commit
5d7853645a
9 changed files with 15 additions and 51 deletions
|
|
@ -435,9 +435,6 @@ class layoutAdminController extends layout
|
|||
$ext = substr(strrchr($filename,'.'),1);
|
||||
$filename = sprintf('%s.%s', md5($filename), $ext);
|
||||
}
|
||||
|
||||
// Check uploaded file
|
||||
if(!checkUploadedFile($source['tmp_name'])) return false;
|
||||
|
||||
if(file_exists($path .'/'. $filename)) @unlink($path . $filename);
|
||||
if(!move_uploaded_file($source['tmp_name'], $path . $filename )) return false;
|
||||
|
|
@ -690,7 +687,7 @@ class layoutAdminController extends layout
|
|||
// check upload
|
||||
if(!Context::isUploaded()) exit();
|
||||
$file = Context::get('file');
|
||||
if(!is_uploaded_file($file['tmp_name']) || !checkUploadedFile($file['tmp_name'])) exit();
|
||||
if(!is_uploaded_file($file['tmp_name'])) exit();
|
||||
|
||||
if(substr_compare($file['name'], '.tar', -4) !== 0) exit();
|
||||
|
||||
|
|
@ -925,7 +922,7 @@ class layoutAdminController extends layout
|
|||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile("after_upload_config_image.html");
|
||||
|
||||
if(!$img['tmp_name'] || !is_uploaded_file($img['tmp_name']) || !checkUploadedFile($img['tmp_name']))
|
||||
if(!$img['tmp_name'] || !is_uploaded_file($img['tmp_name']))
|
||||
{
|
||||
Context::set('msg', lang('upload failed'));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue