mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Patch applied + modified from RaspAP/raspap-insiders#242
This commit is contained in:
18
ajax/system/sys_perform_update.php
Normal file
18
ajax/system/sys_perform_update.php
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user