summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-27 08:38:45 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-27 08:38:45 +0200
commit933f087d2198917c3cd1de4b6dc6dce691fc3a07 (patch)
tree85f3a93ca9d351450530b80b699f6c3c24e2e4ed /apps/user_ldap/group_ldap.php
parentbacada263cac90302578925ecca0d85196f3fabb (diff)
parentbfdf39b9bd286e7739937f8856f85787e987043a (diff)
downloadnextcloud-server-933f087d2198917c3cd1de4b6dc6dce691fc3a07.tar.gz
nextcloud-server-933f087d2198917c3cd1de4b6dc6dce691fc3a07.zip
Merge pull request #17526 from owncloud/fix-17516
LDAP: when checking group for matching filter, also take base DN into…
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 1b83817151c..1bc0392a7d7 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) {