Fix: Correct CSRF token validation in process_trip processor
This commit is contained in:
@@ -15,7 +15,7 @@ if (empty($_SESSION['user_id']) || !in_array($_SESSION['role'] ?? '', ['admin',
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate CSRF token
|
// Validate CSRF token
|
||||||
if (empty($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token'] ?? '') {
|
if (empty($_POST['csrf_token']) || $_POST['csrf_token'] !== ($_SESSION['csrf_token'] ?? '')) {
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
echo json_encode(['status' => 'error', 'message' => 'Invalid CSRF token']);
|
echo json_encode(['status' => 'error', 'message' => 'Invalid CSRF token']);
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user