This commit is contained in:
KANE LAZENI 2026-04-18 23:26:32 +00:00
parent 389a6b3b53
commit 36934552be
2 changed files with 8 additions and 3 deletions

View File

@ -61,11 +61,9 @@ class ControleurRecherche extends Controleur {
*/
if (!Csrf::validateToken($csrf_token)) {
http_response_code(403);
exit('Accès interdit.');
// Distinguer expiration et tentative malveillante
$_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.';
header('Location: ' . $_SERVER['HTTP_REFERER']);
exit;
}

View File

@ -633,6 +633,13 @@
<section class="section main-dashboard">
<div id="contenu">
<div id="div_test_gabarit">
<?php if (!empty($_SESSION['flash_error'])): ?>
<div class="alert alert-warning">
<?= htmlspecialchars($_SESSION['flash_error']) ?>
<?php unset($_SESSION['flash_error']); ?>
</div>
<?php endif; ?>
<?php
/*