From 7559c7e92dd1ac87978b89408b89987695029be5 Mon Sep 17 00:00:00 2001 From: GuiGui <53662627+organix7@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:06:36 +0100 Subject: [PATCH] Vulnerability in password comparison. (Type Juggling) --- lib/functions/tlUser.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions/tlUser.class.php b/lib/functions/tlUser.class.php index 984d837263..6da99bdb3f 100644 --- a/lib/functions/tlUser.class.php +++ b/lib/functions/tlUser.class.php @@ -589,7 +589,7 @@ public function comparePassword(&$dbH,$pwd) $encriptedPWD = $this->getPassword(); if (strlen($encriptedPWD) == 32) { /* Update the old MD5 hash to the new bcrypt */ - if ($encriptedPWD == md5($pwd)) { + if ($encriptedPWD === md5($pwd)) { $this->password = $this->encryptPassword($pwd,$this->authentication); $this->writePasswordToDB($dbH); return tl::OK; @@ -1534,4 +1534,4 @@ function hasRightOnProj(&$db,$roleQuestion) { } -} \ No newline at end of file +}