Explorar o código

Fix for Trac #559: ldap user can login with blank password

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2110 a333f486-631f-4898-b8df-5754b55c2be0
dflaven %!s(int64=13) %!d(string=hai) anos
pai
achega
dd2e5a1866
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      datamodel/authent-ldap/model.authent-ldap.php

+ 1 - 1
datamodel/authent-ldap/model.authent-ldap.php

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