LDAP Group Sync error #5375

Open
opened 2026-02-05 10:00:50 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @lucaguindani on GitHub (Jul 23, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I've enabled the LDAP group sync option following the documentation (https://www.bookstackapp.com/docs/admin/ldap-auth/#ldap-group-sync) and getting an error at login.

production.ERROR: ldap_read(): Search: Invalid DN syntax {"exception":"[object] (ErrorException(code: 0): ldap_read(): Search: Invalid DN syntax at /var/www/bookstack/app/Access/Ldap.php:71)
[stacktrace]
#0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'ldap_read(): Se...', '/var/www/bookst...', 71)

I think it's because the memberOf attribute only contains simple group names (example below), but the LDAP query in bookstack expects the complete DN.

[memberOf] => Array
                (
                    [count] => 10
                    [0] => group-name-1
                    [1] => group-name-2
                    [2] => group-name-3
                    [3] => group-name-4
                    [4] => ...

Is there a way I'm not aware off to still make it work ?

Exact BookStack Version

25.05.2

Hosting Environment

PHP8.4

Originally created by @lucaguindani on GitHub (Jul 23, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario I've enabled the LDAP group sync option following the documentation (https://www.bookstackapp.com/docs/admin/ldap-auth/#ldap-group-sync) and getting an error at login. ``` production.ERROR: ldap_read(): Search: Invalid DN syntax {"exception":"[object] (ErrorException(code: 0): ldap_read(): Search: Invalid DN syntax at /var/www/bookstack/app/Access/Ldap.php:71) [stacktrace] #0 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'ldap_read(): Se...', '/var/www/bookst...', 71) ``` I think it's because the memberOf attribute only contains simple group names (example below), but the LDAP query in bookstack expects the complete DN. ``` [memberOf] => Array ( [count] => 10 [0] => group-name-1 [1] => group-name-2 [2] => group-name-3 [3] => group-name-4 [4] => ... ``` Is there a way I'm not aware off to still make it work ? ### Exact BookStack Version 25.05.2 ### Hosting Environment PHP8.4
OVERLORD added the 🐕 Support label 2026-02-05 10:00:50 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5375