SF Bug #3510114 - Unable to check passwords when samba hashes are in lowercase
This commit is contained in:
parent
6b9834a054
commit
2f70eb41b3
@ -2252,13 +2252,13 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
|
|||||||
|
|
||||||
switch($attribute) {
|
switch($attribute) {
|
||||||
case 'sambalmpassword':
|
case 'sambalmpassword':
|
||||||
if (strcmp($smb->lmhash($plainpassword),$cryptedpassword) == 0)
|
if (strcmp($smb->lmhash($plainpassword),strtoupper($cryptedpassword)) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case 'sambantpassword':
|
case 'sambantpassword':
|
||||||
if (strcmp($smb->nthash($plainpassword),$cryptedpassword) == 0)
|
if (strcmp($smb->nthash($plainpassword),strtoupper($cryptedpassword)) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user