8000 [SecurityBundle] Prevent auto-registration of UserPasswordEncoderCommand by chalasr · Pull Request #22858 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[SecurityBundle] Prevent auto-registration of UserPasswordEncoderCommand #22858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prevent auto-registration of UserPasswordEncoderCommand
  • Loading branch information
chalasr committed May 22, 2017
commit b39b35b95dedb73bbdb2936546c4f7339b077e1d
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public function load(array $configs, ContainerBuilder $container)

if ($config['encoders']) {
$this->createEncoders($config['encoders'], $container);
}

if (class_exists(Application::class)) {
$loader->load('console.xml');
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
}
if (class_exists(Application::class)) {
$loader->load('console.xml');
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
}

// load ACL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ public function testUserCheckerConfigWithNoCheckers()
$this->assertEquals('security.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.secure'));
}

public function testUserPasswordEncoderCommandIsRegistered()
{
$this->assertTrue($this->getContainer('remember_me_options')->has('security.console.user_password_encoder_command'));
}

protected function getContainer($file)
{
$file = $file.'.'.$this->getFileExtension();
Expand Down
0