fix: RateLimit on exact static routes is bypassed by appending a query string#10500
Conversation
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughThis PR fixes rate-limiting and session routing logic by changing three Express request path checks from ChangesQuery-string rate-limit normalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10500 +/- ##
==========================================
+ Coverage 92.60% 92.62% +0.01%
==========================================
Files 193 193
Lines 16941 16941
Branches 240 240
==========================================
+ Hits 15689 15692 +3
+ Misses 1229 1226 -3
Partials 23 23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I will reformat the title to use the proper commit message syntax. |
## [9.9.1-alpha.9](9.9.1-alpha.8...9.9.1-alpha.9) (2026-06-11) ### Bug Fixes * rateLimit on exact static routes is bypassed by appending a query string ([#10500](#10500)) ([880e8e6](880e8e6))
|
🎉 This change has been released in version 9.9.1-alpha.9 |
Issue
Rate limits configured for exact static routes (such as
/loginand/requestPasswordReset) are silently not enforced when a request includes a query string. The rate-limit middleware matches the configured path againstreq.url, which includes the query string, while Express routes on the path only — so appending any query parameter (e.g./login?x=1) evades the limiter while the request still reaches the route.Tasks