CSRF check, exec system/debuglog.sh

This commit is contained in:
billz 2023-10-31 15:17:13 +00:00
parent 362feae185
commit d619269df4

View file

@ -3,8 +3,13 @@
require '../../includes/csrf.php';
require_once '../../includes/config.php';
if (isset($_POST['csrf_token'])) {
if (csrfValidateRequest() && !CSRFValidate()) {
handleInvalidCSRFToken();
}
exec( RASPI_CONFIG.'/system/debuglog.sh', $return);
echo json_encode(end($return));
} else {
handleInvalidCSRFToken();
}
$return = 0;
echo json_encode($return);
?>