mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
CSRF check, exec system/debuglog.sh
This commit is contained in:
parent
362feae185
commit
d619269df4
1 changed files with 9 additions and 4 deletions
|
@ -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);
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue