mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Remove ioutil.ReadAll, except for in tests, and set a message size limit #2138
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#2138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ainar-g on GitHub (Nov 12, 2020).
Originally assigned to: @EugeneOne1 on GitHub.
ioutil.ReadAllshould generally not be used in HTTP APIs, since it doesn't have a size limit. Our current HTTP API is for internal use, but it's still a good precautionary measure, in my opinion. We should probably just set a limit, constant or configurable, for the maximum size of an HTTP request body. Perhaps write our own version ofio.LimitedReaderthat returns a meaningful error instead of anio.EOF.