Put back length check to have a clear error

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/30269/head
Côme Chilliet 3 years ago
parent e5c8ea4f5d
commit c22c7fa7a4
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A

@ -344,6 +344,17 @@ abstract class AbstractMapping {
* @return bool
*/
public function map($fdn, $name, $uuid) {
if (mb_strlen($fdn) > 4096) {
\OC::$server->getLogger()->error(
'Cannot map, because the DN exceeds 4096 characters: {dn}',
[
'app' => 'user_ldap',
'dn' => $fdn,
]
);
return false;
}
$row = [
'ldap_dn_hash' => $this->getDNHash($fdn),
'ldap_dn' => $fdn,

Loading…
Cancel
Save