mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
🔒 ♻️ Implement secure exec
wrapper functions.
This commit is contained in:
parent
6e13036780
commit
8e951ac72e
115 changed files with 1345 additions and 1986 deletions
|
@ -31,15 +31,12 @@ if (!empty($_POST['ok'])) {
|
|||
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
|
||||
// Protect input
|
||||
$v_chain = escapeshellarg($_POST['v_chain']);
|
||||
$v_ip = escapeshellarg($_POST['v_ip']);
|
||||
$v_chain = $_POST['v_chain'];
|
||||
$v_ip = $_POST['v_ip'];
|
||||
|
||||
// Add firewall ban
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v-add-firewall-ban ".$v_ip." ".$v_chain, $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
v_exec('v-add-firewall-ban', [$v_ip, $v_chain]);
|
||||
}
|
||||
|
||||
// Flush field values on success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue