From a1ca7e861fb6508d277c97095a63b4bedb3a02d3 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 13 May 2025 07:49:46 -0700 Subject: [PATCH] Resolve error related to legacy CSRF token handler --- ajax/system/sys_perform_update.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/ajax/system/sys_perform_update.php b/ajax/system/sys_perform_update.php index 662d3d91..1e333134 100644 --- a/ajax/system/sys_perform_update.php +++ b/ajax/system/sys_perform_update.php @@ -5,19 +5,12 @@ require_once '../../includes/session.php'; require_once '../../includes/config.php'; require_once '../../includes/authenticate.php'; -if (isset($_POST['csrf_token'])) { - if (csrfValidateRequest() && !CSRFValidate()) { - handleInvalidCSRFToken(); - } - // set installer path + options - $path = getenv("DOCUMENT_ROOT"); - $opts = " --update --yes --check 0 --path $path"; - $installer = "sudo /etc/raspap/system/raspbian.sh"; - $execUpdate = $installer.$opts; +// set installer path + options +$path = getenv("DOCUMENT_ROOT"); +$opts = " --update --yes --check 0 --path $path"; +$installer = "sudo /etc/raspap/system/raspbian.sh"; +$execUpdate = $installer.$opts; - $response = shell_exec($execUpdate); - echo json_encode($response); +$response = shell_exec($execUpdate); +echo json_encode($response); -} else { - handleInvalidCSRFToken(); -}