New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpFoundation] Prevent accepted rate limits with no remaining token to be preferred over denied ones #47283
Conversation
Thanks for the blazing fast bug fix, @MatTheCat!
Can you please add a test case for this fix, so we can be sure not to break it in the future?
src/Symfony/Component/HttpFoundation/RateLimiter/AbstractRequestRateLimiter.php
Outdated
Show resolved
Hide resolved
@wouterj thanks! What should I do to make my test pass? Seems my changes are missing from them |
751caf4
to
d07c9ea
Compare
See https://symfony.com/doc/current/contributing/code/pull_requests.html#automated-tests for more information about our test suite. The failing checks are checking each individual package, rather than the monorepo. So it'll download rate limiter in the current available version, rather than the version of your PR. Ideally, we would have a test for this abstract class' behavior in the HttpFoundation component itself. If you have some time, it would be great to create a |
9ef5695
to
311c53b
Compare
Okay, remaining failures seem unrelated |
… to be preferred over denied ones
Thank you @MatTheCat. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
When a rate limit is first accepted with no remaining token, following rejected rate limits will be ignored because they also will have no remaining token. The request would then be processed.