mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
Checking token on adding and deleting favorites
This commit is contained in:
parent
5262b3f447
commit
475fe47984
3 changed files with 11 additions and 6 deletions
|
@ -5,6 +5,11 @@
|
|||
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Check token
|
||||
if ((!isset($_REQUEST['token'])) || ($_SESSION['token'] != $_REQUEST['token'])) {
|
||||
die("Wrong token");
|
||||
}
|
||||
|
||||
unset($_SESSION['favourites'][strtoupper($_REQUEST['v_section'])][$_REQUEST['v_unit_id']]);
|
||||
|
||||
$v_section = escapeshellarg($_REQUEST['v_section']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue