mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Fix for Trac #559: ldap user can login with blank password
SVN:1.2.1[2108]
This commit is contained in:
@@ -120,7 +120,7 @@ class UserLDAP extends UserInternal
|
||||
$aEntry = ldap_get_entries($hDS, $hSearchResult);
|
||||
$sUserDN = $aEntry[0]['dn'];
|
||||
$bUserBind = @ldap_bind($hDS, $sUserDN, $sPassword);
|
||||
if ($bUserBind !== false)
|
||||
if (($bUserBind !== false) && !empty($sPassword))
|
||||
{
|
||||
ldap_unbind($hDS);
|
||||
return true; // Password Ok
|
||||
|
||||
Reference in New Issue
Block a user