From 8caeb119916cfd3b692402c34d42fba2826a8181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 27 Jan 2026 14:05:53 +0100 Subject: [PATCH] fix(user_ldap): Fix crash in some code path when a DN is longer that 64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UserConfig throws in this case. Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/User/Manager.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php index 88a001dd965..cc19dae2867 100644 --- a/apps/user_ldap/lib/User/Manager.php +++ b/apps/user_ldap/lib/User/Manager.php @@ -163,9 +163,14 @@ class Manager { * @return bool */ public function isDeletedUser($id) { - $isDeleted = $this->ocConfig->getUserValue( - $id, 'user_ldap', 'isDeleted', 0); - return (int)$isDeleted === 1; + try { + $isDeleted = $this->ocConfig->getUserValue($id, 'user_ldap', 'isDeleted', 0); + return (int)$isDeleted === 1; + } catch (\InvalidArgumentException $e) { + // Most likely the string is too long to be a valid user id + $this->logger->debug('Invalid id given to isDeletedUser', ['exception' => $e]); + return false; + } } /**