From 0de9fee7f57a29a2f515259f813a7f5251820f2e Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 20 Jan 2024 18:22:38 +0100 Subject: [PATCH] hash mdp --- .../services/authentificationService/AuthentificationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs b/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs index 61656ff..2002bc3 100644 --- a/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs +++ b/VeraxShield/VeraxShield/services/authentificationService/AuthentificationService.cs @@ -22,7 +22,7 @@ public class AuthentificationService : IAuthentificationService await this.MajUtilisateurs(); var utilisateur = this.UtilisateursApplication.FirstOrDefault(w => w.Pseudo == requete.Pseudo && w.Mdp == requete.MotDePasse); - if (utilisateur == null) + if (utilisateur == null && !BCrypt.Net.BCrypt.Verify(requete.MotDePasse, utilisateur.Mdp)) { throw new Exception("Pseudo ou mot de passe invalide ! "); }