Commit f97d2bb
Raza Sharif
fix: enforce maxMessageSize in readRequestBody
The maxMessageSize configuration value was defined in
DEFAULT_HTTP_STREAM_CONFIG (4MB) but never checked in
readRequestBody(). This allowed unbounded request body
accumulation, enabling remote denial of service via a
single large HTTP POST request.
This commit adds size tracking in readRequestBody() and
destroys the request if the configured limit is exceeded.
Fixes GHSA-353c-v8x9-v7c31 parent 1993394 commit f97d2bb
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
227 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
| |||
0 commit comments