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

This commit is contained in:
Arthur Schiwon 2013-11-25 22:08:11 +01:00
parent 3955388f20
commit 03375d6c52
1 changed files with 3 additions and 1 deletions

View File

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