Overview
Investigate adding protection against large request bodies to prevent potential DoS attacks in the ParseRequest function.
Details
- Consider implementing http.MaxBytesReader with a configurable size limit (suggested 1MB)
- Evaluate the appropriate size limit for the use case
- Consider making the limit configurable
References
Impact
Adding this protection would help prevent:
- Memory exhaustion from large payloads
- Potential DoS attacks
- Unnecessary resource consumption