summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-07-09 12:19:04 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-07-09 12:19:04 +0200
commitbfdf39b9bd286e7739937f8856f85787e987043a (patch)
tree81533dea2371f9f50b993e9748309ba967d51984 /apps/user_ldap/group_ldap.php
parent2b86ba43e33b2cd4339722548d22800ea4218a57 (diff)
downloadnextcloud-server-bfdf39b9bd286e7739937f8856f85787e987043a.tar.gz
nextcloud-server-bfdf39b9bd286e7739937f8856f85787e987043a.zip
LDAP: when checking group for matching filter, also take base DN into consideration. Fixes #17516
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r--apps/user_ldap/group_ldap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index a7a90c75832..24695f64fa8 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -382,7 +382,12 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
if (is_array($groupDNs)) {
$groupDNs = $this->access->groupsMatchFilter($groupDNs);
foreach ($groupDNs as $dn) {
- $groups[] = $this->access->dn2groupname($dn);
+ $groupName = $this->access->dn2groupname($dn);
+ if(is_string($groupName)) {
+ // be sure to never return false if the dn could not be
+ // resolved to a name, for whatever reason.
+ $groups[] = $groupName;
+ }
}
}
if($primaryGroup !== false) {