Skip to content

#229 - Login throttling: do not count the HTTP API requests, honour login_throttling: false, explicit error without rate limiter - #232

Merged
njoubert-cleverage merged 1 commit into
mainfrom
229
Oct 23, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
229

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #229.

Regression of 3.4 (#207, #222): the login throttling of the main firewall also applied to the HTTP API.

  • The requests of the HTTP API are no longer counted by the login throttling: LoginThrottlingPass decorates the limiter of every firewall login throttling listener (HttpProcessExecutionRequestRateLimiter, peekable or not as the decorated limiter), so that the requests supported by HttpProcessExecutionAuthenticator (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 of TooManyLoginAttemptsAuthenticationException is empty); the "Missing auth token." / "Invalid token." messages are unchanged.
  • login_throttling: false (literal) in the application main firewall 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).
  • With framework.rate_limiter: false, an explicit LogicException explains how to fix the configuration instead of Parent definition "limiter" does not exist.

Tested with Symfony 8.1, 7.4 and 6.4 (lowest dependencies, PHP 8.2).

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None.

🤖 Generated with Claude Code

…ogin_throttling: false, explicit error without rate limiter

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage requested a review from a team as a code owner October 23, 2026 19:13
@njoubert-cleverage
njoubert-cleverage merged commit 8b729e9 into main Oct 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login throttling also applies to the HTTP API, cannot be disabled, fails without rate limiter

1 participant