From e873cc928019ce437c0041677f32ccc6fefc41be Mon Sep 17 00:00:00 2001 From: pkamps Date: Sun, 1 Jul 2018 08:49:09 +0200 Subject: [PATCH] EZP-29021: User cannot login using PASSWORD_HASH_MD5_PASSWORD (#105) --- 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 b89418aa85c..9ad836f1756 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" ); }