]> source.dussan.org Git - nextcloud-server.git/commitdiff
Log a warning when a user or group is mapped with a suffix 37575/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 4 Apr 2023 12:06:13 +0000 (14:06 +0200)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 4 Apr 2023 12:08:24 +0000 (14:08 +0200)
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 <come.chilliet@nextcloud.com>
apps/user_ldap/lib/Access.php

index 1cc0c62ff1d177353c542c7184173a5eed496887..d3510e7a398f0b282b66c8113d54ecd9efb033b7 100644 (file)
@@ -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;
                        }