From 814fec7d2a87ca1d950367ba28e203ab9c64f550 Mon Sep 17 00:00:00 2001 From: Fardale Date: Wed, 24 Apr 2019 23:36:25 +0200 Subject: [PATCH] fix crypt password verification function --- re2o/login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2o/login.py b/re2o/login.py index 0b552239..d45fed5a 100644 --- a/re2o/login.py +++ b/re2o/login.py @@ -115,7 +115,7 @@ class CryptPasswordHasher(hashers.BasePasswordHasher): """ assert encoded.startswith(self.algorithm) salt = hash_password_salt(encoded) - return constant_time_compare(crypt.crypt(password, salt), + return constant_time_compare(self.algorithm + crypt.crypt(password, salt), encoded) def safe_summary(self, encoded):