-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
featureLet's update application to work even betterLet's update application to work even better
Description
Description
The current API rate limits are excessively high, posing potential security risks (Brute-force, DoS, Disk Exhaustion).
Analysis
Current limits (per minute):
- Auth: 500 (Too permissive for brute-force protection)
- API: 5000 (Unnecessarily high for a single user)
- Upload: 1000 (Major risk of Disk Space Exhaustion - 5GB+/min potential)
Proposed Changes
Adjust the limits in backend/src/middleware/rateLimit.js to values that balance security with usability, considering users behind NAT/Reverse Proxies.
| Limiter | Old Value | New Value | Reasoning |
|---|---|---|---|
| Auth | 500 | 120 | Allows ~2 req/s. Sufficient for small teams behind NAT, but slows down brute-force attacks significantly. |
| API | 5000 | 1000 | Sufficient for heavy sync usage, prevents backend overload. |
| Upload | 1000 | 60 | Limits uploads to ~1/sec. Prevents rapid disk filling while allowing normal drag & drop usage. |
Tasks
- Update
authLimitermax to 120. - Update
apiLimitermax to 1000. - Update
uploadLimitermax to 60.
Complexity
Complexity: 1/10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureLet's update application to work even betterLet's update application to work even better