mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-12-29 20:00:41 +01:00
Fixed Direct Install Uploader, failing to validate the uploaded files
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user