Skip to content

LDAP default username #1982

@andrzejwp

Description

@andrzejwp

While debugging #1967 I encountered a different problem with LDAP.

I have a double surname and thus my email is in the format firstname.surname1-surname2@mydomain.com.

Email is the filter I'm using for LDAP: {"filter":"(&(objectClass=*)(mail=#{username}))", "scope":"sub","userDN":"uid=ldaptest,ou=People,dc=dc1,dc=dc2", "password":""}.

And so I'm using my full email to login to Rocket.Chat. However, when I register - RC creates the username by converting the before-@ part of my email to firstname.surname1.surname2 (replaces "-" with ".").
Because I changed the default username I received, to match my email address (I brought back the "-" instead of ".") RC stopped matching my account from LDAP with that in the database and wouldn't allow me to login. LDAP queries were successful, because they were executed using the proper credentials (email & password), but it appears that internally RC is matching the converted username with usernames in the database and in my case - couldn't find any.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions