-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDAP: Error thrown when no CN provided by LDAP server #5443
Comments
Hi, I had to change https://github.com/BookStackApp/BookStack/blob/release/app/Access/LdapService.php#L108 from
to
because there seems to be a bug with loading this var from .env https://github.com/BookStackApp/BookStack/blob/release/app/Config/services.php#L130 However in my case it seems unrelated to how ldap binding is done (anon or not). Below is the error with the original code:
Stacktrace:
|
Changes default fallback for name to first DN part, otherwise the whole DN, rather than leave as null which was causing a type error. For #5443
Thanks @dofeldsc for raising. This was applicable for any scenario where the server was not providing a @thereiam I couldn't find any specific issue in loading the |
@ssddanbrown |
Describe the Bug
Null default value causes exception in App/Access
/LdapService.php on login.
If this is done with anonymous bind and cn is not accessible, argument 3 (userCn) for getUserDisplayName is null, which is not allowed.
This change came with Version 24.12, before that login with this config worked fine.
Not a breaking change, but thught you should know :)
Best regards and thanks for your work!
Steps to Reproduce
Expected Behaviour
Login
Screenshots or Additional Context
No response
Browser Details
No response
Exact BookStack Version
24.12.1
The text was updated successfully, but these errors were encountered: