Repository navigation
#229 - Login throttling: do not count the HTTP API requests, honour login_throttling: false, explicit error without rate limiter - #232
Merged
Conversation
…ogin_throttling: false, explicit error without rate limiter Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #229.
Regression of 3.4 (#207, #222): the login throttling of the
mainfirewall also applied to the HTTP API.LoginThrottlingPassdecorates the limiter of every firewall login throttling listener (HttpProcessExecutionRequestRateLimiter, peekable or not as the decorated limiter), so that the requests supported byHttpProcessExecutionAuthenticator(its route) are neither counted nor reset. The firewall settings (max_attempts,interval,limiter) still apply to the login form. Failed logins no longer block a valid API token, invalid tokens no longer block the login form of the IP address.HttpProcessExecutionAuthenticator::onAuthenticationFailure()answers the message key of the exception (the message ofTooManyLoginAttemptsAuthenticationExceptionis empty); the "Missing auth token." / "Invalid token." messages are unchanged.login_throttling: false(literal) in the applicationmainfirewall is honoured (the bundle configuration, merged after it, enabled it again).login_throttling: ~still enables it with the default settings. The bundle configuration is still appended, not prepended (Login throttling: an application with another firewall than main cannot boot #222).framework.rate_limiter: false, an explicitLogicExceptionexplains how to fix the configuration instead ofParent definition "limiter" does not exist.Tested with Symfony 8.1, 7.4 and 6.4 (lowest dependencies, PHP 8.2).
Requirements
Breaking changes
None.
🤖 Generated with Claude Code