summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-11-25 22:08:11 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-11-25 22:08:11 +0100
commit03375d6c522035b108e4cf00239b9705b93dc377 (patch)
tree27f0fd4b5543763d9ee8efd4a626e8df06938758
parent3955388f204d58dddbd3f787d66f570a0f61855b (diff)
downloadnextcloud-server-03375d6c522035b108e4cf00239b9705b93dc377.tar.gz
nextcloud-server-03375d6c522035b108e4cf00239b9705b93dc377.zip
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
-rw-r--r--apps/user_ldap/lib/access.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index a07bd3fa11f..ecc74b6cf54 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -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;
}