devbox/cmd
shoemoney fd361e811e harden(dos): bound request bodies + add hub server timeouts 🚪🛡️
The hub read request bodies with unbounded io.ReadAll / json.Decode and ran
http.ListenAndServe with zero timeouts — a single client could OOM it or hold
connections open (slowloris). Now:
- handleBlob caps the body at 256 MiB, decode() caps JSON at 8 MiB, both via
  http.MaxBytesReader -> 413 when exceeded.
- serve uses an http.Server with ReadHeaderTimeout/ReadTimeout/IdleTimeout +
  MaxHeaderBytes. WriteTimeout intentionally unset so the long-lived /v1/events
  SSE stream isn't killed. [fanned-out subagent: harden-dos]
2026-06-23 02:59:53 -05:00
..
devbox docs: correct stale M2/M3 comments (SSE shipped, conflict handling live) 📝 2026-06-23 01:45:50 -05:00
devbox-hub harden(dos): bound request bodies + add hub server timeouts 🚪🛡️ 2026-06-23 02:59:53 -05:00