mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Revert "[SECURITY] Fix OS command injection."
This commit is contained in:
parent
9620bfbf35
commit
39e9b6397b
115 changed files with 1980 additions and 1340 deletions
|
@ -7,9 +7,16 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_GET['pkg'])) {
|
||||
$v_pkg = $_GET['pkg'];
|
||||
v_exec('v-update-sys-vesta', [$v_pkg]);
|
||||
$v_pkg = escapeshellarg($_GET['pkg']);
|
||||
exec (VESTA_CMD."v-update-sys-vesta ".$v_pkg, $output, $return_var);
|
||||
}
|
||||
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: '.$v_pkg.' update failed';
|
||||
$_SESSION['error_msg'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
header("Location: /list/updates/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue