8000 [SecurityBundle] Passwords are not encoded when algorithm set to \"tr… · symfony/symfony@5d593d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d593d5

Browse files
Jeroen van den NieuwenhuisenRobin Chalas
Jeroen van den Nieuwenhuisen
authored and
Robin Chalas
committed
[SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
1 parent cb429cd commit 5d593d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,13 @@ private function addEncodersSection(ArrayNodeDefinition $rootNode)
421421
->performNoDeepMerging()
422422
->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end()
423423
->children()
424-
->scalarNode('algorithm')->cannotBeEmpty()->end()
424+
->scalarNode('algorithm')
425+
->cannotBeEmpty()
426+
->validate()
427+
->ifTrue(function ($v) { return !\is_string($v); })
428+
->thenInvalid('You must provide a string value.')
429+
->end()
430+
->end()
425431
->scalarNode('hash_algorithm')->info('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.')->defaultValue('sha512')->end()
426432
->scalarNode('key_length')->defaultValue(40)->end()
427433
->booleanNode('ignore_case')->defaultFalse()->end()

0 commit comments

Comments
 (0)
0