[Console] Added a notice to warn the users about the php files uploaded with the files manager
This commit is contained in:
parent
c687e6a97b
commit
64ec82f9d6
|
@ -720,6 +720,17 @@ function filemanager_file_explorer($real_directory, $relative_directory,
|
|||
$hash = md5($relative_path . $config['dbpass']);
|
||||
$data[1] = '<a href="' . $hack_metaconsole . 'include/get_file.php?file='.urlencode(base64_encode($relative_path)).'&hash=' . $hash . '">'.$fileinfo['name'].'</a>';
|
||||
}
|
||||
|
||||
// Notice that uploaded php files could be dangerous
|
||||
if (pathinfo($fileinfo['realpath'], PATHINFO_EXTENSION) == 'php' &&
|
||||
(is_readable($fileinfo['realpath']) || is_executable($fileinfo['realpath']))) {
|
||||
$error_message = __('This file could be executed by any user');
|
||||
$error_message .= '. ' . __('Make sure it can\'t perform dangerous tasks');
|
||||
$data[1] = '<span class="error forced_title" data-title="' . $error_message . '" data-use_title_for_force_title="1">'
|
||||
. $data[1]
|
||||
. '</span>';
|
||||
}
|
||||
|
||||
$data[2] = ui_print_timestamp ($fileinfo['last_modified'], true,
|
||||
array ('prominent' => true));
|
||||
if ($fileinfo['is_dir']) {
|
||||
|
|
Loading…
Reference in New Issue