]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/LdapService.php
Improve sorting Shelf Books
[bookstack] / app / Auth / Access / LdapService.php
index d377705583ac9011384de7aee2ddc092a984a452..92234edcf906bc2934a47443af011de388d2f853 100644 (file)
@@ -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'];