This commit is contained in:
KANE LAZENI 2026-04-23 15:10:17 +00:00
parent bc23a2c8c6
commit 906485dc42
3 changed files with 8 additions and 8 deletions

View File

@ -307,8 +307,7 @@
<!-- Contestation Form -->
<form action="<?= $action ?>" method="post">
<!-- <input type="hidden" id="csrf_token" name="csrf_token" value="<?= htmlspecialchars($token) ?>"> -->
<input class="form-control" type="text" id="csrf_token" name="csrf_token" value="<?= htmlspecialchars($token) ?>">
<input type="hidden" id="csrf_token" name="csrf_token" value="<?= htmlspecialchars($token) ?>">
<div class="mb-4">
<label for="motifContestation" class="form-label required">

View File

@ -197,6 +197,10 @@
</head>
<body class='bg-light'>
<div class='error-container'>
<!-- <input type='hidden' id='csrf_token' name='csrf_token' value='<?= htmlspecialchars($token) ?>'> -->
<input class='form-control' type='text' id='csrf_token' name='csrf_token' value='<?= htmlspecialchars($token) ?>'>
<div class='error-card'>
<div class='text-center mb-3'>
<i class='bi bi-exclamation-triangle-fill text-danger' style='font-size: 3rem;'></i>

View File

@ -57,8 +57,7 @@ function afficherMessage($message, $estErreur = true) {
exit();
}
var_dump($_POST);
// var_dump($_POST);
if (!isset($_POST['csrf_token'])) {
afficherMessage("<strong>Mauvaise session!</strong>");
@ -68,12 +67,10 @@ $csrf_token = trim($_POST['csrf_token']);
if (!Csrf::validateToken($csrf_token)) {
afficherMessage("<strong>Mauvaise session!</strong>");
// exit;
}
echo "On peut maintenant contester";
exit;
// echo "On peut maintenant contester";
// exit;
// Configuration de la langue
if (!isset($_SESSION['codeLangue'])) {