SF Bug #3510114 - Unable to check passwords when samba hashes are in lowercase

This commit is contained in:
Deon George 2012-09-05 21:25:50 +10:00
parent 6b9834a054
commit 2f70eb41b3

View File

@ -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;