adding enhanced csrf protection
Deploy / deploy (push) Successful in 33s

This commit is contained in:
2026-05-06 09:07:48 +02:00
parent 7ae7df0a11
commit d82a08f77b
25 changed files with 132 additions and 7 deletions
+4 -1
View File
@@ -1,4 +1,8 @@
<?php
include "../utils/security.php";
secure_session_start();
require_same_origin_request();
require_csrf_token();
// Check if the POST request contains 'token' and 'password'
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (!isset($_POST['token']) || !isset($_POST['password']) || !isset($_POST['confirm_password'])) {
@@ -67,4 +71,3 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
echo json_encode(['status' => 'error', 'message' => 'Invalid request method.']);
}
?>