From 6e08d3f4156d732c7f8b5abe96bd1cfb50aae40f Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Thu, 15 Nov 2018 16:43:28 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9cup=C3=A9ration=20correcte=20du=20sel=20?= =?UTF-8?q?dans=20le=20mot=20de=20passe=20encod=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- re2o/login.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/re2o/login.py b/re2o/login.py index 471c2e02..0b552239 100644 --- a/re2o/login.py +++ b/re2o/login.py @@ -114,9 +114,9 @@ class CryptPasswordHasher(hashers.BasePasswordHasher): Check password against encoded using CRYPT algorithm """ assert encoded.startswith(self.algorithm) - salt = hash_password_salt(challenge_password) - return constant_time_compare(crypt.crypt(password.encode(), salt), - challenge.encode()) + salt = hash_password_salt(encoded) + return constant_time_compare(crypt.crypt(password, salt), + encoded) def safe_summary(self, encoded): """