Fixed Unrestricted Authentication Endpoint#70
Merged
krishnapaljadeja merged 5 commits intogdg-charusat:mainfrom Feb 28, 2026
Merged
Conversation
Contributor
✅ PR Validation PassedHey @Krish3017! Your PR looks good. Here is what we found:
A maintainer will review your PR within 24–48 hours. Stay responsive to feedback!
|
Contributor
|
@Krish3017 can you please remove package-lock.json from the commit and rebase it.thankyou |
Contributor
🎉 PR Merged — Points Awarded!Congratulations @Krish3017! Your contribution has been merged.
The central leaderboard has been updated. Keep contributing!
|
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.
Team Number : Team 152
Description
Implemented comprehensive rate limiting on authentication endpoints to protect against brute-force attacks, account enumeration, and denial-of-service attacks. This security enhancement adds request throttling to login and registration endpoints, along with global API rate limiting.
Related Issue
Closes #67
Type of Change
Changes Made
express-rate-limitpackage for implementing rate limitingsrc/config/rateLimiter.jswith three rate limiter configurations:authLimiter: 5 requests per 15 minutes for login endpointregisterLimiter: 3 requests per 60 minutes for registration endpointapiLimiter: 100 requests per 15 minutes for all API routesauthLimiterto/api/auth/loginendpoint insrc/routes/auth.routes.jsregisterLimiterto/api/auth/registerendpoint insrc/routes/auth.routes.jsapiLimiterto all/api/*routes insrc/app.jsTesting
npm run build)Checklist
Additional Notes
This implementation follows OWASP security best practices for authentication rate limiting. The rate limits are configured conservatively:
These limits can be adjusted based on actual usage patterns and requirements. The implementation uses sliding window rate limiting for better accuracy and returns standardized
RateLimit-*headers to inform clients of their current rate limit status.