Patch applied + modified from RaspAP/raspap-insiders#242

This commit is contained in:
billz
2023-11-20 14:45:55 +00:00
parent 2151a44729
commit ba45daad19
10 changed files with 220 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
<?php
require '../../includes/csrf.php';
if (isset($_POST['csrf_token'])) {
if (csrfValidateRequest() && !CSRFValidate()) {
handleInvalidCSRFToken();
}
// set installer path + options
$path = getenv("DOCUMENT_ROOT");
$opts = " --update --path $path --yes";
$installer = "curl -sL https://install.raspap.com | bash -s -- ";
$execUpdate = $installer.$opts;
echo json_encode($execUpdate);
} else {
handleInvalidCSRFToken();
}