fix: harden outbound HTTP clients with timeouts and bounded reads #62
No reviewers
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codefloe/forgejo-codefloe!62
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/http-client-hardening"
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?
Addresses the HTTP Requests section of #19.
External API calls previously used
http.DefaultClient(which has no timeout) and read responses without bound, so a stalled or misbehaving endpoint could hang a request indefinitely. These are localized changes to stable modules, so they carry little risk of conflicting with future upstream merges.Changes
http.DefaultClient.io.LimitReader.Verification
go build/go veton all touched packagesgo test ./modules/hcaptcha/... ./modules/auth/password/pwn/...gofmt/gofumpt -extracleanCloses the four HTTP checkboxes in #19.
ba4df35822777d3f5581