Skip to content

Commit e6fb478

Browse files
authored
Merge pull request #25366 from nextcloud/backport/25361/stable20
[stable20] fix parameter provided as string not array
2 parents 2c23dd4 + 71a762b commit e6fb478

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/user_ldap/lib/Group_LDAP.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public function getDynamicGroupMembers(string $dnGroup): array {
222222
$pos = strpos($memberURLs[0], '(');
223223
if ($pos !== false) {
224224
$memberUrlFilter = substr($memberURLs[0], $pos);
225-
$foundMembers = $this->access->searchUsers($memberUrlFilter, 'dn');
225+
$foundMembers = $this->access->searchUsers($memberUrlFilter, ['dn']);
226226
$dynamicMembers = [];
227227
foreach ($foundMembers as $value) {
228228
$dynamicMembers[$value['dn'][0]] = 1;
@@ -915,6 +915,7 @@ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
915915
$attrs = $this->access->userManager->getAttributes(true);
916916
foreach ($members as $member) {
917917
switch ($this->ldapGroupMemberAssocAttr) {
918+
/** @noinspection PhpMissingBreakStatementInspection */
918919
case 'zimbramailforwardingaddress':
919920
//we get email addresses and need to convert them to uids
920921
$parts = explode('@', $member);
@@ -1088,6 +1089,7 @@ public function getGroups($search = '', $limit = -1, $offset = 0) {
10881089
if (!$this->enabled) {
10891090
return [];
10901091
}
1092+
$search = $this->access->escapeFilterPart($search, true);
10911093
$cacheKey = 'getGroups-' . $search . '-' . $limit . '-' . $offset;
10921094

10931095
//Check cache before driving unnecessary searches

0 commit comments

Comments
 (0)