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] |
||
|---|---|---|
| .. | ||
| chunk | ||
| config | ||
| daemon | ||
| hooks | ||
| hub | ||
| identity | ||
| ignore | ||
| manifest | ||
| secret | ||
| syncer | ||
| transport | ||
| watch | ||