From 4c215e8592266b40b172a9b7e02ad27537d854eb Mon Sep 17 00:00:00 2001 From: Eugene Suprun Date: Wed, 30 Aug 2023 03:12:45 +0300 Subject: [PATCH] Check smd5 password fix (#222) Closes #221 --- lib/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.php b/lib/functions.php index e1b8d3ae..81624088 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -2425,7 +2425,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword case 'smd5': $hash = base64_decode($cryptedpassword); $salt = substr($hash,16); - $new_hash = base64_encode(md5($plainpassword.$salt).$salt, true); + $new_hash = base64_encode(md5($plainpassword.$salt, true).$salt); if (strcmp($cryptedpassword,$new_hash) == 0) return true;