mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Fix for CSRF in FileManager and UploadHandler
This commit is contained in:
parent
63861e4ffd
commit
93de22a0b3
6 changed files with 29 additions and 9 deletions
|
@ -1,6 +1,11 @@
|
|||
<?php
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Check token
|
||||
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
||||
die("Wrong token or missing token");
|
||||
}
|
||||
|
||||
if ((!isset($_SESSION['FILEMANAGER_KEY'])) || (empty($_SESSION['FILEMANAGER_KEY']))) {
|
||||
header("Location: /login/");
|
||||
exit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue