Skip to content

Commit

Permalink
Prevent overwriting failure_handler in security configuration if set
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Mar 1, 2024
1 parent 78762b5 commit caf319a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Changelog
=========
## 2.2.1 (2024-03-xx)
* Bugfix: Prevent overwriting `failure_path` in `AuthenticationFailureHandler` when connect functionality is not enabled
* Bugfix: Prevent overwriting `failure_path` in `AuthenticationFailureHandler` when connect functionality is not enabled,
* Bugfix: Prevent overwriting `failure_handler` in security configuration if set,

## 2.2.0 (2024-02-28)
* BC Break: Dropped support for PHP 7.4 & 8.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ public function getFirewallNames(): \ArrayIterator
protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config): string
{
$id = $this->getFailureHandlerId($id);
if ($container->has($id)) {
return $id;
}

$options = array_intersect_key($config, $this->defaultFailureHandlerOptions);

$failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.custom_failure_handler'));
Expand Down

0 comments on commit caf319a

Please sign in to comment.