mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if(($_SESSION['access'] ?? 0) < 9) die("Access denied: You are not Admin!");
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()). Only POST
|
||||
// requests mutate state; the ?do=download link is a plain GET (a read) and must
|
||||
// not be blocked, so guard the check on the request method.
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? '') === 'POST') {
|
||||
csrf_verify();
|
||||
}
|
||||
|
||||
include_once("../../Database.php");
|
||||
|
||||
// Resolve project root (max 5 levels up), like the rest of the codebase.
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ if (empty($_SESSION['access']) || $_SESSION['access'] < 9) {
|
||||
die("Access Denied: You are not Admin!");
|
||||
}
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
include_once("../../config.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../Database.php");
|
||||
$id = (int) $_POST['id'];
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ if (empty($_SESSION['access']) || $_SESSION['access'] < 9) {
|
||||
die("Access Denied: You are not Admin!");
|
||||
}
|
||||
|
||||
// Issue #139: this Mod is POSTed to directly, so it must verify the CSRF token
|
||||
// itself (it does not go through admin.php's central csrf_verify()).
|
||||
require_once(__DIR__ . '/../csrf.php');
|
||||
csrf_verify();
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user