diff options
Diffstat (limited to 'apps/user_ldap/lib/Mapping/AbstractMapping.php')
-rw-r--r-- | apps/user_ldap/lib/Mapping/AbstractMapping.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php index 8e7f1f8b137..6fb4a5436c3 100644 --- a/apps/user_ldap/lib/Mapping/AbstractMapping.php +++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php @@ -209,6 +209,17 @@ abstract class AbstractMapping { * @return bool */ public function map($fdn, $name, $uuid) { + if(mb_strlen($fdn) > 255) { + \OC::$server->getLogger()->error( + 'Cannot map, because the DN exceeds 255 characters: {dn}', + [ + 'app' => 'user_ldap', + 'dn' => $fdn, + ] + ); + return false; + } + $row = array( 'ldap_dn' => $fdn, 'owncloud_name' => $name, |