Fix for downloading backup of other users

This commit is contained in:
myvesta 2020-12-12 12:54:06 +01:00 committed by GitHub
commit 5da09d9c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,13 @@
error_reporting(NULL);
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check token
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
header('Location: /login/');
exit();
}
$backup = basename($_GET['backup']);
// Check if the backup exists