diff --git a/includes/functions.php b/includes/functions.php index 859f67ed..3099defc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -338,9 +338,9 @@ function CSRFValidate() { if(isset($_POST['csrf_token'])) { $post_token = $_POST['csrf_token']; - $header_token = $_SERVER['HTTP_X_CSRF_TOKEN']; + $header_token = $_SERVER['HTTP_X_CSRF_TOKEN'] ?? null; - if (empty($post_token) && empty($header_token)) { + if (empty($post_token) && is_null($header_token)) { return false; } $request_token = $post_token; diff --git a/templates/dhcp/advanced.php b/templates/dhcp/advanced.php index 041a9555..59db1be9 100644 --- a/templates/dhcp/advanced.php +++ b/templates/dhcp/advanced.php @@ -7,7 +7,7 @@