8000 feature #21718 [SecurityBundle] Don't normalize username of in-memory… · symfony/symfony@d69bb30 · GitHub
[go: up one dir, main page]

Skip to content

Commit d69bb30

Browse files
committed
feature #21718 [SecurityBundle] Don't normalize username of in-memory users (chalasr)
This PR was merged into the 3.3-dev branch. Discussion ---------- [SecurityBundle] Don't normalize username of in-memory users | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a It's common to have e.g. emails as keys in `security.providers.in_memory.users` since keys are username. Actually they are normalized so `foo-bar@gmail.com` becomes `foo_bar@gmail.com` and authentication fails unexpectedly. Commits ------- 8d03332 [SecurityBundle] Don't normalize keys of in-memory users
2 parents 99f60dc + 8d03332 commit d69bb30

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

UPGRADE-3.3.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ SecurityBundle
113113
* `UserPasswordEncoderCommand::getContainer()` is deprecated, and this class won't
114114
extend `ContainerAwareCommand` nor implement `ContainerAwareInterface` anymore in 4.0.
115115

116+
* [BC BREAK] Keys of the `users` node for `in_memory` user provider are no longer normalized.
117+
116118
Serializer
117119
----------
118120

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

8000
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CHANGELOG
99
* Deprecated `UserPasswordEncoderCommand::getContainer()` and relying on the
1010
`ContainerAwareInterface` interface for this command.
1111
* Deprecated the `FirewallMap::$map` and `$container` properties.
12+
* [BC BREAK] Keys of the `users` node for `in_memory` user provider are no longer normalized.
1213

1314
3.2.0
1415
-----

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function addConfiguration(NodeDefinition $node)
5252
->children()
5353
->arrayNode('users')
5454
->useAttributeAsKey('name')
55+
->normalizeKeys(false)
5556
->prototype('array')
5657
->children()
5758
->scalarNode('password')->defaultValue(uniqid('', true))->end()

0 commit comments

Comments
 (0)
0