Skip to content

Commit cdb0b49

Browse files
author
Jeroen van den Nieuwenhuisen
committed
Don't allow true as algorithm config value
1 parent e9366b4 commit cdb0b49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private function addEncodersSection(ArrayNodeDefinition $rootNode)
399399
->performNoDeepMerging()
400400
->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end()
401401
->children()
402-
->scalarNode('algorithm')->cannotBeEmpty()->end()
402+
->scalarNode('algorithm')->cannotBeEmpty()->validate()->ifTrue()->thenInvalid('Invalid algorithm %s')->end()->end()
403403
->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()
404404
->scalarNode('key_length')->defaultValue(40)->end()
405405
->booleanNode('ignore_case')->defaultFalse()->end()

0 commit comments

Comments
 (0)