Skip to content

LDAP Group Sync error #5730

@lucaguindani

Description

@lucaguindani

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions