diff --git a/Controleur/ControleurRechercheprestations.php b/Controleur/ControleurRechercheprestations.php index 030aba0f..0beecbe4 100755 --- a/Controleur/ControleurRechercheprestations.php +++ b/Controleur/ControleurRechercheprestations.php @@ -32,10 +32,16 @@ class ControleurRechercheprestations extends Controleur { $this->beneficiaire->getModeBiometrie(); if(!empty($_POST)) - // if (isset($_POST['numeroBeneficiaire'])) { $csrf_token = trim($this->requete->getParametreFormulaire("csrf_token")); - + + if (!Csrf::validateToken($csrf_token)) { + $_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.'; + + header('Location: ' . $_SERVER['HTTP_REFERER']); + exit; + } + $numeroBeneficiaire = trim($this->requete->getParametreFormulaire("numeroBeneficiaire")); $numeroAdherent = trim($this->requete->getParametreFormulaire('numeroAdherent')); $nomBeneficiaire = trim($this->requete->getParametreFormulaire('nomBeneficiaire'));