From 07e0291bfad8ef3a8b37bf0d0ebf20df936e7b7f Mon Sep 17 00:00:00 2001 From: polo Date: Sat, 14 Aug 2021 01:32:59 +0200 Subject: password --- controller/visitor.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'controller/visitor.php') diff --git a/controller/visitor.php b/controller/visitor.php index 16f9c40..539df1f 100644 --- a/controller/visitor.php +++ b/controller/visitor.php @@ -87,6 +87,7 @@ function connexion($secret) if($_SESSION['admin'] == 1) { header('Location: index.php?page=' . $_GET['from']); + exit(); } // Ajouter une sécurité par cpatcha avec un "input" supplémentaire @@ -105,14 +106,15 @@ function connexion($secret) { $_SESSION['admin'] = 1; header('Location: index.php?page=' . $_GET['from']); - exit (); + exit(); } - // mauvaise mot de passe + // mauvais mot de passe elseif(isset ($_POST["motdepasse"]) AND $_POST["motdepasse"] != $secret) { // défense aux attaques par force brute // pas parfait, ne marche pas si l'attaquant multiplie les connexions au site + echo($erreurMDP); sleep(1); echo($formulaireConnexion); } @@ -124,4 +126,4 @@ function connexion($secret) } echo($footer); -} \ No newline at end of file +} -- cgit v1.2.3