atproto git client
atgc plan http-bounds.md
8.5 kB · 136 lines


id: http-bounds title: No stranger's response costs atgc unbounded time or memory status: shipped repos: [atgc] dependsOn: [] exitCriterion: > Every response atgc reads is bounded in bytes as it arrives and in the gap between bytes, and a refusal names the host and the limit. #

http-bounds #

The hosts atgc reads from are not atgc's. A did:web in a pull URI names a hostname the author chose; a did:plc document's serviceEndpoint is equally theirs. So atgc pr view at://did:web:evil.example/… fetches that host's .well-known/did.json and then that host's getRecord response, and for a long time read whatever they sent.

Bounds are enforced against bytes actually received, never against a header the sender controls or a size the record's author wrote: a hostile pull could declare size: 100 and stream gigabytes. Measured against the flood, peak RSS went from 143 MB to 33 MB.

One hole is left and is stated rather than papered over: a body read through jacquard's transport is buffered whole before atgc sees it.

What it needs #

Done #