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
{{ message }}
Repository navigation
[Bug][Backend] rateLimitService.checkRateLimit uses '<' instead of '<=' causing off-by-one that blocks the Nth allowed request #2027
Description:
In rateLimitService.checkRateLimit, the Redis Lua script INCR_AND_EXPIRE_SCRIPT increments the request counter before returning currentCount (so the 1st request returns 1, and the maxRequests-th request returns maxRequests). However, line 88 checks const allowed = currentCount < config.maxRequests;. When config.maxRequests = 5, the 5th request receives currentCount = 5, so 5 < 5 evaluates to false, rejecting the 5th request with HTTP 429.
Impact:
Every rate limiter using rateLimitService.checkRateLimit permits maxRequests - 1 requests instead of maxRequests.
Suggested Fix:
Change line 88 in backend/src/services/rateLimitService.ts from const allowed = currentCount < config.maxRequests; to const allowed = currentCount <= config.maxRequests;.
I am interested in taking up "[Bug][Backend] rateLimitService.checkRateLimit uses '<' instead of '<=' causing off-by-one that blocks the Nth allowed request" and implementing a production-grade solution.
I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.
I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.
@lancefair431-code has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
I’d love to help out with this issue. I’ve checked the current codebase/documentation and know exactly what needs to be updated to make this clearer. I will ensure everything aligns perfectly with your existing contribution guidelines.
@shadrach68 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello maintainer,
I’m a Full Stack Blockchain, Mobile, and Software Engineer with experience building scalable and production ready applications.
I’ve reviewed this particular issue and understand its requirements. If assigned, I’ll begin work immediately, provide regular updates, and deliver a clean, well-tested, and maintainable solution that meets the project’s standards.
@moon-code12 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello Maintainers, I would like to express my interest in working on this issue. I have reviewed the issue description and understand the problem that needs to be addressed. My approach will be to investigate the existing codebase, identify the root cause, and implement a solution that follows the project's existing architecture and coding standards.
Congratulations, @bade2brazy! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @bade2brazy: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
😎 @bade2brazy: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Activity
ranjeet150 commentedon Oct 18, 2026
Hello,
I am interested in taking up "[Bug][Backend] rateLimitService.checkRateLimit uses '<' instead of '<=' causing off-by-one that blocks the Nth allowed request" and implementing a production-grade solution.
I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.
I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.
Thank you!
tijanib141 commentedon Oct 18, 2026
@tijanib141 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @tijanib141 to this issue.
lancefair431-code commentedon Oct 18, 2026
@lancefair431-code has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @lancefair431-code to this issue.
Wittig18 commentedon Oct 18, 2026
@Wittig18 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Wittig18 to this issue.
shadrach68 commentedon Oct 18, 2026
@shadrach68 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @shadrach68 to this issue.
bade2brazy commentedon Oct 18, 2026
@bade2brazy has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @bade2brazy to this issue.
moon-code12 commentedon Oct 18, 2026
@moon-code12 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @moon-code12 to this issue.
Muyideen-js commentedon Oct 18, 2026
@Muyideen-js has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Muyideen-js to this issue.
innocentharuna commentedon Oct 18, 2026
@innocentharuna has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @innocentharuna to this issue.
christianezeanya commentedon Oct 18, 2026
@christianezeanya has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @christianezeanya to this issue.
Teejay2696 commentedon Oct 18, 2026
@Teejay2696 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Teejay2696 to this issue.
CollinsKRO commentedon Oct 18, 2026
@CollinsKRO has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CollinsKRO to this issue.
VeronicDev commentedon Oct 18, 2026
@VeronicDev has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @VeronicDev to this issue.
drips-wave commentedon Oct 18, 2026
Congratulations, @bade2brazy! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @bade2brazy: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
bade2brazy commentedon Oct 18, 2026
Resolved in PR #2032. Fixed off-by-one by changing
<to<=inrateLimitService.checkRateLimitand updated unit tests.fix(backend): correct rateLimit off-by-one to allow Nth request (#2027)
drips-wave commentedon Oct 18, 2026
This issue has been completed by @bade2brazy as part of the Stellar Wave Program's 10th Wave 🥳
😎 @bade2brazy: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.