From 2f70eb41b3f24b9ec1723634ee8dfac81d66ece2 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 5 Sep 2012 21:25:50 +1000 Subject: [PATCH] SF Bug #3510114 - Unable to check passwords when samba hashes are in lowercase --- lib/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index 68263b9..56d8bf3 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -2252,13 +2252,13 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword switch($attribute) { case 'sambalmpassword': - if (strcmp($smb->lmhash($plainpassword),$cryptedpassword) == 0) + if (strcmp($smb->lmhash($plainpassword),strtoupper($cryptedpassword)) == 0) return true; else return false; case 'sambantpassword': - if (strcmp($smb->nthash($plainpassword),$cryptedpassword) == 0) + if (strcmp($smb->nthash($plainpassword),strtoupper($cryptedpassword)) == 0) return true; else return false;