mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
CSRF check, exec system/debuglog.sh
This commit is contained in:
parent
362feae185
commit
d619269df4
@ -3,8 +3,13 @@
|
|||||||
require '../../includes/csrf.php';
|
require '../../includes/csrf.php';
|
||||||
require_once '../../includes/config.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…
x
Reference in New Issue
Block a user