Update missing CSRF endpoint checks

This commit is contained in:
johnnyq
2026-07-24 13:16:51 -04:00
parent e7698f15bd
commit 91a1676e89
10 changed files with 38 additions and 5 deletions

View File

@@ -4,6 +4,8 @@ defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
if (isset($_GET['update'])) {
validateCSRFToken($_GET['csrf_token']);
enforceAdminPermission();
//git fetch downloads the latest from remote without trying to merge or rebase anything. Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master
@@ -284,6 +286,8 @@ if (isset($_GET['update'])) {
if (isset($_GET['update_db'])) {
validateCSRFToken($_GET['csrf_token']);
// Get the current version
require_once ('../includes/database_version.php');