Merge pull request #25366 from nextcloud/backport/25361/stable20

[stable20] fix parameter provided as string not array
This commit is contained in:
Julius Härtl 2021-01-28 22:12:36 +01:00 committed by GitHub
commit e6fb478dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -222,7 +222,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$pos = strpos($memberURLs[0], '(');
if ($pos !== false) {
$memberUrlFilter = substr($memberURLs[0], $pos);
$foundMembers = $this->access->searchUsers($memberUrlFilter, 'dn');
$foundMembers = $this->access->searchUsers($memberUrlFilter, ['dn']);
$dynamicMembers = [];
foreach ($foundMembers as $value) {
$dynamicMembers[$value['dn'][0]] = 1;
@ -915,6 +915,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$attrs = $this->access->userManager->getAttributes(true);
foreach ($members as $member) {
switch ($this->ldapGroupMemberAssocAttr) {
/** @noinspection PhpMissingBreakStatementInspection */
case 'zimbramailforwardingaddress':
//we get email addresses and need to convert them to uids
$parts = explode('@', $member);
@ -1088,6 +1089,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
if (!$this->enabled) {
return [];
}
$search = $this->access->escapeFilterPart($search, true);
$cacheKey = 'getGroups-' . $search . '-' . $limit . '-' . $offset;
//Check cache before driving unnecessary searches