LDAP Authentication Documentation incorrect #180

Closed
opened 2026-02-04 17:28:24 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @robrotheram on GitHub (Oct 13, 2016).

PHP Version:7

MySQL Version:5.6

Expected Behavior: Working Ldap config

Actual Behavior: Ldap connection failer

This is beacuse the config listed at https://www.bookstackapp.com/docs/admin/ldap-auth
LDAP_SERVER pramater as a connection string ie ldap://example.com:389

Due to not type checking of the this paramater the explode function creates invalid connection parmaters
https://github.com/ssddanbrown/BookStack/blob/master/app/Services/LdapService.php#L116

Using the example url the explode function will create an array with 3 elements "ldap","//example.com",389

Since the connection paramater only looks at the first 2 elements in the array the connection parmaters are now increct snince the port needs to be a integer and now gets the string "//example.com"

My suggestion is to remove the ldap:// from the documentation to avoid further confusion or do type checking on the paramater somethink like if starts with 'ldap://'

Originally created by @robrotheram on GitHub (Oct 13, 2016). PHP Version:7 MySQL Version:5.6 Expected Behavior: Working Ldap config Actual Behavior: Ldap connection failer This is beacuse the config listed at [https://www.bookstackapp.com/docs/admin/ldap-auth](https://www.bookstackapp.com/docs/admin/ldap-auth) LDAP_SERVER pramater as a connection string ie ldap://example.com:389 Due to not type checking of the this paramater the explode function creates invalid connection parmaters https://github.com/ssddanbrown/BookStack/blob/master/app/Services/LdapService.php#L116 Using the example url the explode function will create an array with 3 elements "ldap","//example.com",389 Since the connection paramater only looks at the first 2 elements in the array the connection parmaters are now increct snince the port needs to be a integer and now gets the string "//example.com" My suggestion is to remove the ldap:// from the documentation to avoid further confusion or do type checking on the paramater somethink like `if starts with 'ldap://'`
OVERLORD added the 📖 Docs Update label 2026-02-04 17:28:24 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Oct 25, 2016):

@robrotheram Thanks for letting me know about this documentation issue, Sorry for the hassle it may have caused you.

@ssddanbrown commented on GitHub (Oct 25, 2016): @robrotheram Thanks for letting me know about this documentation issue, Sorry for the hassle it may have caused you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#180