X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/29cc35a304e4ca19db6bad77087fdf1b8a3f8ac5..refs/pull/2393/head:/app/Auth/Access/LdapService.php diff --git a/app/Auth/Access/LdapService.php b/app/Auth/Access/LdapService.php index d37770558..92234edcf 100644 --- a/app/Auth/Access/LdapService.php +++ b/app/Auth/Access/LdapService.php @@ -45,6 +45,13 @@ class LdapService extends ExternalAuthService $ldapConnection = $this->getConnection(); $this->bindSystemUser($ldapConnection); + // Clean attributes + foreach ($attributes as $index => $attribute) { + if (strpos($attribute, 'BIN;') === 0) { + $attributes[$index] = substr($attribute, strlen('BIN;')); + } + } + // Find user $userFilter = $this->buildFilter($this->config['user_filter'], ['user' => $userName]); $baseDn = $this->config['base_dn'];