From d626ecc8c725e5d7dbc85b37704f5ca142183b43 Mon Sep 17 00:00:00 2001 From: Gunnstein Lye Date: Fri, 22 Jun 2018 15:46:09 +0200 Subject: [PATCH] Fix regression which broke PASSWORD_HASH_MD5_PASSWORD (#1354) (cherry picked from commit 0ffed7d752f80f635f99ec3c690713a0f21f9526) --- kernel/classes/datatypes/ezuser/ezuser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/classes/datatypes/ezuser/ezuser.php b/kernel/classes/datatypes/ezuser/ezuser.php index 7f1b64b25b9..39bbaebe6fc 100644 --- a/kernel/classes/datatypes/ezuser/ezuser.php +++ b/kernel/classes/datatypes/ezuser/ezuser.php @@ -1812,7 +1812,11 @@ static function createHash( $user, $password, $site, $type, $hash = false ) $password = self::trimAuthString( $password ); $str = ''; - if( $type == self::PASSWORD_HASH_MD5_USER ) + if ( $type == self::PASSWORD_HASH_MD5_PASSWORD ) + { + $str = md5( $password ); + } + else if ( $type == self::PASSWORD_HASH_MD5_USER ) { $str = md5( "$user\n$password" ); }