Skip to content

Commit f8cc63f

Browse files
author
EXT - THERAGE Kevin
committed
[LDAP] Fixing missing 'user_identifier' forward compatibility in CheckLdapCredentialsListener
1 parent 9a65138 commit f8cc63f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function onCheckPassport(CheckPassportEvent $event)
8585
}
8686
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
8787
$username = $ldap->escape(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), '', LdapInterface::ESCAPE_FILTER);
88-
$query = str_replace('{username}', $username, $ldapBadge->getQueryString());
88+
$query = str_replace(['{username}', '{user_identifier}'], $username, $ldapBadge->getQueryString());
8989
$result = $ldap->query($ldapBadge->getDnString(), $query)->execute();
9090
if (1 !== $result->count()) {
9191
throw new BadCredentialsException('The presented username is invalid.');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy