8000 [LDAP] Issue with case-sensitive usernames · Issue #20486 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[LDAP] Issue with case-sensitive usernames #20486
Closed
@quentinus95

Description

@quentinus95

When authenticating a user using the LDAP security component, username entered by the user is used to build the User instance.

In case of a case-insensitive authentication (which is the default behavior : https://stackoverflow.com/questions/29897684/is-ldap-dn-case-insensitive), the final User username can be wrong (for instance, USERNAME instead of UserName).

To avoid this issue, I'm using the cn attribute of the Ldap\Entry instead, so I'm getting the well-spelled username. To apply a more generic solution, I think we should store the $uidKey as an attribute in the LdapUserProvider and use it to retrieve the username using the Entry ($entry->getAttribute($this->uidKey)).

I can create a pull request if you want.

Thx !

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

      0