Skip to content

Commit 30baf82

Browse files
committed
fix(ldap): replace {username} with {user_identifier} in LDAP factories
In SF 7.0, the deprecated {username} placeholder was removed in favor of {user_identifier} (in #50866). However, the default values for the filter and dn_string parameters still contained {username} instead of the updated key. This PR changes the value to the new updated key Signed-off-by: Thomas Citharel <tcit@tcit.fr>
1 parent 63d9a53 commit 30baf82

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginLdapFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function addConfiguration(NodeDefinition $node): void
3232
$node
3333
->children()
3434
->scalarNode('service')->defaultValue('ldap')->end()
35-
->scalarNode('dn_string')->defaultValue('{username}')->end()
35+
->scalarNode('dn_string')->defaultValue('{user_identifier}')->end()
3636
->scalarNode('query_string')->end()
3737
->scalarNode('search_dn')->defaultValue('')->end()
3838
->scalarNode('search_password')->defaultValue('')->end()

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicLdapFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function addConfiguration(NodeDefinition $node): void
7777
$node
7878
->children()
7979
->scalarNode('service')->defaultValue('ldap')->end()
80-
->scalarNode('dn_string')->defaultValue('{username}')->end()
80+
->scalarNode('dn_string')->defaultValue('{user_identifier}')->end()
8181
->scalarNode('query_string')->end()
8282
->scalarNode('search_dn')->defaultValue('')->end()
8383
->scalarNode('search_password')->defaultValue('')->end()

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/JsonLoginLdapFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function addConfiguration(NodeDefinition $node): void
2929
$node
3030
->children()
3131
->scalarNode('service')->defaultValue('ldap')->end()
32-
->scalarNode('dn_string')->defaultValue('{username}')->end()
32+
->scalarNode('dn_string')->defaultValue('{user_identifier}')->end()
3333
->scalarNode('query_string')->end()
3434
->scalarNode('search_dn')->defaultValue('')->end()
3535
->scalarNode('search_password')->defaultValue('')->end()

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function addConfiguration(NodeDefinition $node): void
6464
->prototype('scalar')->end()
6565
->end()
6666
->scalarNode('uid_key')->defaultValue('sAMAccountName')->end()
67-
->scalarNode('filter')->defaultValue('({uid_key}={username})')->end()
67+
->scalarNode('filter')->defaultValue('({uid_key}={user_identifier})')->end()
6868
->scalarNode('password_attribute')->defaultNull()->end()
6969
->end()
7070
;

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