From d9eac14b61dc7fbba8ecb5a95f919b3d03829c83 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sat, 18 Apr 2026 23:11:49 +0000 Subject: [PATCH] a --- Controleur/ControleurRecherche.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Controleur/ControleurRecherche.php b/Controleur/ControleurRecherche.php index aeffd0b7..24707de8 100755 --- a/Controleur/ControleurRecherche.php +++ b/Controleur/ControleurRecherche.php @@ -48,9 +48,18 @@ class ControleurRecherche extends Controleur { $email=trim($_POST['email']); */ - var_dump($csrf_token); + // var_dump($csrf_token); + // Csrf:: + // Dans vos fichiers de traitement POST + if (!Csrf::validateToken($csrf_token)) { + http_response_code(403); + + // Distinguer expiration et tentative malveillante + $_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.'; + header('Location: ' . $_SERVER['HTTP_REFERER']); + exit; + } - exit; if($numeroBeneficiaire != '') {