mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -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
|
@ -9,15 +9,13 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|||
// Check token
|
||||
// if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
|
||||
// header('location: /login/');
|
||||
// exit();
|
||||
// exit;
|
||||
// }
|
||||
|
||||
// Protect input
|
||||
$v_section = escapeshellarg($_REQUEST['v_section']);
|
||||
$v_unit_id = escapeshellarg($_REQUEST['v_unit_id']);
|
||||
$v_section = $_REQUEST['v_section'];
|
||||
$v_unit_id = $_REQUEST['v_unit_id'];
|
||||
|
||||
$_SESSION['favourites'][strtoupper($_REQUEST['v_section'])][$_REQUEST['v_unit_id']] = 1;
|
||||
$_SESSION['favourites'][strtoupper((string)$v_section)][(string)$v_unit_id] = 1;
|
||||
|
||||
exec (VESTA_CMD."v-add-user-favourites ".$_SESSION['user']." ".$v_section." ".$v_unit_id, $output, $return_var);
|
||||
// check_return_code($return_var,$output);
|
||||
v_exec('v-add-user-favourites', [$_SESSION['user'], $v_section, $v_unit_id], false/*true*/);
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue