From 0887810eb9e1f65ac1ec02dc2c59445a2d892549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 7 Apr 2026 16:26:02 +0200 Subject: [PATCH] fix: Use a CappedMemoryCache instead of an array to cache stuff in user_ldap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Access.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 8b82b607774..eb8b72109ee 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -16,6 +16,7 @@ use OCA\User_LDAP\Exceptions\NoMoreResults; use OCA\User_LDAP\Mapping\AbstractMapping; use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\OfflineUser; +use OCP\Cache\CappedMemoryCache; use OCP\EventDispatcher\IEventDispatcher; use OCP\HintException; use OCP\IAppConfig; @@ -49,7 +50,7 @@ class Access extends LDAPUtility { protected $groupMapper; private string $lastCookie = ''; - private array $intermediates = []; + private CappedMemoryCache $intermediates; public function __construct( ILDAPWrapper $ldap, @@ -63,6 +64,7 @@ class Access extends LDAPUtility { ) { parent::__construct($ldap); $this->userManager->setLdapAccess($this); + $this->intermediates = new CappedMemoryCache(); } /**