mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Ensure a CSRF token exists in session
This commit is contained in:
@@ -19,6 +19,12 @@ class CSRFTokenizer {
|
||||
public function __construct()
|
||||
{
|
||||
$this->ensureSession();
|
||||
|
||||
// ensure a CSRF token exists in the session
|
||||
if (empty($_SESSION['csrf_token'])) {
|
||||
$this->ensureCSRFSessionToken;
|
||||
}
|
||||
|
||||
if ($this->csrfValidateRequest() && !$this->CSRFValidate($_SESSION['csrf_token'])) {
|
||||
$this->handleInvalidCSRFToken();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user