From 3b73f079ef1a269a09eeb00cc7e3a1111926000d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 28 Apr 2022 13:52:48 +0200 Subject: [PATCH] =?utf8?q?Use=20`\hash('md5',=20=E2=80=A6)`=20instead=20of?= =?utf8?q?=20`\md5()`=20in=20TPhpass?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This makes it easier to parameterize the implementation. --- .../user/authentication/password/algorithm/TPhpass.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php index a816c16bf5..d7c7168235 100644 --- a/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php +++ b/wcfsetup/install/files/lib/system/user/authentication/password/algorithm/TPhpass.class.php @@ -42,9 +42,9 @@ trait TPhpass return $output; } - $hash = \md5($salt . $password, true); + $hash = \hash('md5', $salt . $password, true); do { - $hash = \md5($hash . $password, true); + $hash = \hash('md5', $hash . $password, true); } while (--$count); $output = \mb_substr($settings, 0, 12, '8bit'); -- 2.20.1