Skip to content

Commit

Permalink
bug #51359 [Security] Fix error with lock_factory in login_throttling…
Browse files Browse the repository at this point in the history
… (BaptisteContreras)

This PR was merged into the 6.3 branch.

Discussion
----------

[Security] Fix error with lock_factory in login_throttling

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #51347
| License       | MIT
| Doc PR        |

Remove incorrect check for Lock configuration in **Security Bundle** which leads to an exception when using lock_factory of the **login_throttling** (as explained in #51347)

Commits
-------

a22e891 [Security] Fix error with lock_factory in login_throttling
  • Loading branch information
fabpot committed Aug 12, 2023
2 parents 7ec4f8d + a22e891 commit a0c1de1
Showing 1 changed file with 0 additions and 3 deletions.
Expand Up @@ -98,9 +98,6 @@ private function registerRateLimiter(ContainerBuilder $container, string $name,
if (!interface_exists(LockInterface::class)) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be installed. Try running "composer require symfony/lock".', $name));
}
if (!$container->hasDefinition('lock.factory.abstract')) {
throw new LogicException(sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
}

$limiter->replaceArgument(2, new Reference($limiterConfig['lock_factory']));
}
Expand Down

0 comments on commit a0c1de1

Please sign in to comment.