LDAP: username2dn should only return DNs that belong to the current LDAP server. Might be not perfect. Easy perfect solution would increase communication with LDAP server. Let's see if it is good enough

remotes/origin/stable6
Arthur Schiwon 2013-11-25 22:08:11 +07:00
parent 3955388f20
commit 03375d6c52
1 changed files with 3 additions and 1 deletions

@ -199,7 +199,9 @@ class Access extends LDAPUtility {
*/
public function username2dn($name) {
$dn = $this->ocname2dn($name, true);
if($dn) {
//Check whether the DN belongs to the Base, to avoid issues on multi-
//server setups
if($dn && $this->isDNPartOfBase($dn, $this->connection->ldapBaseUsers)) {
return $dn;
}