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;