You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from the Security Bundle, I noticed that this if is the problem :
### LoginThrottlingFactory line 101if (!$container->hasDefinition('lock.factory.abstract')) {
thrownewLogicException(sprintf('Rate limiter "%s" requires the Lock component to be configured.', $name));
}
If I dump $container->getDefinitions() before this if I don't see any lock in the definitions array, which seems to be the issue here.
I don't see the usefulness of this check here.
The 'lock.factory.abstract' is created in the Framework Bundle and the Security Bundle can't see it at this stage.
From my understanding we can either discard this change and let an error pop later saying that this service does not exist
or move this check in a CompilerPass. (I personally would go for the first solution)
… (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
Symfony version(s) affected
'>= 6.2'
Description
I just upgraded my project from 5.4 to 6.3 and this error popped up :
Rate limiter "_login_local_main" requires the Lock component to be configured.
After some tests, I found out that this line (in my
security.yaml
) is the cause :When I looked in
from the Security Bundle, I noticed that this if is the problem :
If I dump
$container->getDefinitions()
before this if I don't see any lock in thedefinitions
array, which seems to be the issue here.This check was added in this PR : #45569
I don't see the usefulness of this check here.
The 'lock.factory.abstract' is created in the Framework Bundle and the Security Bundle can't see it at this stage.
From my understanding we can either discard this change and let an error pop later saying that this service does not exist
or move this check in a CompilerPass. (I personally would go for the first solution)
How to reproduce
Using PHP 8.2.7
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: