diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php index f3022e9c..1b440761 100644 --- a/admin/pages/accounts.php +++ b/admin/pages/accounts.php @@ -13,6 +13,9 @@ use MyAAC\Models\Player; defined('MYAAC') or die('Direct access not allowed!'); $title = 'Account editor'; + +csrfProtect(); + $admin_base = ADMIN_URL . '?p=accounts'; $use_datatable = true; @@ -289,6 +292,7 @@ else if (isset($_REQUEST['search'])) {
+
@@ -581,6 +585,7 @@ else if (isset($_REQUEST['search'])) {
+
@@ -590,6 +595,7 @@ else if (isset($_REQUEST['search'])) {
+
diff --git a/admin/pages/changelog.php b/admin/pages/changelog.php index 3d5cad64..34e7c01a 100644 --- a/admin/pages/changelog.php +++ b/admin/pages/changelog.php @@ -13,12 +13,15 @@ use MyAAC\Models\Changelog as ModelsChangelog; defined('MYAAC') or die('Direct access not allowed!'); +$title = 'Changelog'; + +csrfProtect(); + if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) { echo 'Access denied.'; return; } -$title = 'Changelog'; $use_datatable = true; const CL_LIMIT = 600; // maximum changelog body length ?> diff --git a/admin/pages/dashboard.php b/admin/pages/dashboard.php index e24b98ad..a8a15e4c 100644 --- a/admin/pages/dashboard.php +++ b/admin/pages/dashboard.php @@ -10,6 +10,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Dashboard'; +csrfProtect(); + if (isset($_GET['clear_cache'])) { if (clearCache()) { success('Cache cleared.'); diff --git a/admin/pages/login.php b/admin/pages/login.php index 8bb25f36..eb6466d3 100644 --- a/admin/pages/login.php +++ b/admin/pages/login.php @@ -10,6 +10,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Login'; +csrfProtect(); + require PAGES . 'account/login.php'; if ($logged) { header('Location: ' . (admin() ? ADMIN_URL : BASE_URL)); diff --git a/admin/pages/mailer.php b/admin/pages/mailer.php index 732b7461..cf8ef241 100644 --- a/admin/pages/mailer.php +++ b/admin/pages/mailer.php @@ -10,6 +10,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Mailer'; +csrfProtect(); + if (!hasFlag(FLAG_CONTENT_MAILER) && !superAdmin()) { echo 'Access denied.'; return; diff --git a/admin/pages/mass_account.php b/admin/pages/mass_account.php index 63bec54c..549310a5 100644 --- a/admin/pages/mass_account.php +++ b/admin/pages/mass_account.php @@ -16,6 +16,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Mass Account Actions'; +csrfProtect(); + $hasCoinsColumn = $db->hasColumn('accounts', 'coins'); $hasPointsColumn = $db->hasColumn('accounts', 'premium_points'); $freePremium = $config['lua']['freePremium']; diff --git a/admin/pages/mass_teleport.php b/admin/pages/mass_teleport.php index 5027fa1c..f2a7ee27 100644 --- a/admin/pages/mass_teleport.php +++ b/admin/pages/mass_teleport.php @@ -16,6 +16,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Mass Teleport Actions'; +csrfProtect(); + function admin_teleport_position($x, $y, $z) { if (!Player::query()->update([ 'posx' => $x, 'posy' => $y, 'posz' => $z diff --git a/admin/pages/menus.php b/admin/pages/menus.php index a0b492df..a6b06773 100644 --- a/admin/pages/menus.php +++ b/admin/pages/menus.php @@ -13,6 +13,8 @@ use MyAAC\Models\Menu; defined('MYAAC') or die('Direct access not allowed!'); $title = 'Menus'; +csrfProtect(); + if (!hasFlag(FLAG_CONTENT_MENUS) && !superAdmin()) { echo 'Access denied.'; return; @@ -93,6 +95,7 @@ if (isset($_REQUEST['template'])) {

+ @@ -112,6 +115,7 @@ if (isset($_REQUEST['template'])) { $last_id = array(); ?>