Fixed Direct Install Uploader, failing to validate the uploaded files

This commit is contained in:
Djamil Legato
2018-10-16 07:36:54 -07:00
parent 06c4fcafd9
commit 2e8cb6c45b
2 changed files with 3 additions and 1 deletions

View File

@@ -2335,10 +2335,11 @@ class AdminController extends AdminBaseController
return false;
}
$file_name = $_FILES['uploaded_file']['name'];
$file_path = $_FILES['uploaded_file']['tmp_name'];
// Handle bad filenames.
if (!Utils::checkFilename($file_path)) {
if (!Utils::checkFilename($file_name)) {
$this->admin->json_response = [
'status' => 'error',
'message' => $this->admin->translate('PLUGIN_ADMIN.UNKNOWN_ERRORS')