1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- apps/user_ldap/lib/Group_LDAP.php
+++ apps/user_ldap/lib/Group_LDAP.php
@@ -62,7 +62,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
protected CappedMemoryCache $cachedGroupsByMember;
/** @var CappedMemoryCache<string[]> $cachedNestedGroups array of groups with gid (DN) as key */
protected CappedMemoryCache $cachedNestedGroups;
- protected GroupInterface $groupPluginManager;
+ protected GroupPluginManager $groupPluginManager;
protected LoggerInterface $logger;
/**
@@ -243,8 +243,9 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
* @psalm-param array<string, bool> $seen List of DN that have already been processed.
* @throws ServerNotAvailableException
*/
- private function _groupMembers(string $dnGroup, array &$seen = []): array {
+ private function _groupMembers(string $dnGroup, array $seen = [], bool &$recursive = false): array {
if (isset($seen[$dnGroup])) {
+ $recursive = true;
return [];
}
$seen[$dnGroup] = true;
@@ -317,7 +318,9 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
unset($allMembers[$index]);
}
- $this->access->connection->writeToCache($cacheKey, $allMembers);
+ if (!$recursive) {
+ $this->access->connection->writeToCache($cacheKey, $allMembers);
+ }
if (isset($attemptedLdapMatchingRuleInChain)
|