From 51705da7a42b5a1a1028f6b4ced375ebf76a6d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 4 Apr 2023 14:06:13 +0200 Subject: [PATCH] Log a warning when a user or group is mapped with a suffix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the time, this is the result of a misconfiguration by the admin and is not what is expected. Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Access.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 1cc0c62ff1d..d3510e7a398 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -589,6 +589,15 @@ class Access extends LDAPUtility { $altName = $this->createAltInternalOwnCloudName($intName, $isUser); if (is_string($altName)) { if ($this->mapAndAnnounceIfApplicable($mapper, $fdn, $altName, $uuid, $isUser)) { + $this->logger->warning( + 'Mapped {fdn} as {altName} because of a name collision on {intName}.', + [ + 'fdn' => $fdn, + 'altName' => $altName, + 'intName' => $intName, + 'app' => 'user_ldap', + ] + ); $newlyMapped = true; return $altName; }