Authentication not working correctly when DN has special chars #568

Closed
opened 2026-02-04 21:07:04 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Mika56 on GitHub (Feb 6, 2018).

  • BookStack Version: v0.19.0
  • PHP Version: 7.1.10 (From solidnerd/bookstack)
  • MySQL Version: 5.7
Expected Behavior

Users that have special chars in their DN should be able to login a second time

Current Behavior

When a user has special chars in its DN, it can log in once. If it logs out, it cannot log in again as the email address is already in use.
In settings, the external authentication ID shows CN=Charl instead of CN=Charlène Thibaud,OU=Larmor-Plage,DC=azimut,DC=local. (The name is also truncated at the special char).

Steps to Reproduce

Install Bootstack and link it to an LDAP server.
Have a user with a special char in its DN, like é, è, ê, ë, à, ç, etc...

Originally created by @Mika56 on GitHub (Feb 6, 2018). * BookStack Version: v0.19.0 * PHP Version: 7.1.10 (From solidnerd/bookstack) * MySQL Version: 5.7 ##### Expected Behavior Users that have special chars in their DN should be able to login a second time ##### Current Behavior When a user has special chars in its DN, it can log in once. If it logs out, it cannot log in again as the email address is already in use. In settings, the external authentication ID shows `CN=Charl` instead of `CN=Charlène Thibaud,OU=Larmor-Plage,DC=azimut,DC=local`. (The name is also truncated at the special char). ##### Steps to Reproduce Install Bootstack and link it to an LDAP server. Have a user with a special char in its DN, like é, è, ê, ë, à, ç, etc...
OVERLORD added the 🐛 Bug label 2026-02-04 21:07:04 +03:00
Author
Owner

@Mika56 commented on GitHub (Feb 27, 2018):

Same problem with 0.20.0

@Mika56 commented on GitHub (Feb 27, 2018): Same problem with 0.20.0
Author
Owner

@ssddanbrown commented on GitHub (Mar 18, 2018):

Hi @Mika56,
Sorry for the delay in my response.
I've tested this out today using the name Charlène Thibaud in both the CN and uid. I was not able to re-produce your issue and I was able to re-login, Even after forcing the CN to be stored as the external_auth_id.

Would it be possible for you to check the users table in the database to see the collation used? I'm wondering if your table does not support UTF8 characters?

@ssddanbrown commented on GitHub (Mar 18, 2018): Hi @Mika56, Sorry for the delay in my response. I've tested this out today using the name `Charlène Thibaud` in both the CN and `uid`. I was not able to re-produce your issue and I was able to re-login, Even after forcing the CN to be stored as the `external_auth_id`. Would it be possible for you to check the `users` table in the database to see the `collation` used? I'm wondering if your table does not support UTF8 characters?
Author
Owner

@ssddanbrown commented on GitHub (Dec 17, 2020):

Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Dec 17, 2020): Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Author
Owner

@Mika56 commented on GitHub (Apr 23, 2021):

Hi,
If anyone happens to find this issue and have the same bug, I've found a fix in another issue:
Add

LDAP_VERSION=3

In your configuration file.
If that's not enough, you can also convert your database to utf8mb4 (see docs), but that shouldn't be the source of the problem.

@Mika56 commented on GitHub (Apr 23, 2021): Hi, If anyone happens to find this issue and have the same bug, I've found a fix in another issue: Add ```ini LDAP_VERSION=3 ``` In your configuration file. If that's not enough, you can also convert your database to utf8mb4 (see docs), but that shouldn't be the source of the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#568