Commit Graph
3 Commits
  • Update deps and simplify parsing
    Bump frontend and Go dependencies, then modernize a few hot paths with newer Go string/range helpers. Also widen the client form quota/limit fields to improve the layout.
  • style(node): tighten the comments and probe assertion from the QA pass
    Two follow-ups on the preceding fixes, no behaviour change:
    
    - The sweep comment in inbound_node.go had grown to a contiguous six-line
      block, over the two-line maximum. The prefix rationale it carried is
      already stated by nodeSelectedTagSet itself and by 6f40a51d's message.
    - The probe cap test asserted only that an error came back, which cannot
      tell a size rejection from a transport failure or a success=false
      envelope. It now pins LastError to the decode rejection.
    
    Both remain red-first: neutralizing maxProbeBodyBytes still fails the probe
    test on the new assertion.
  • fix(node): cap the status body the heartbeat probe decodes
    probe decoded the node status response with json.NewDecoder(resp.Body) and no
    size limit. encoding/json buffers the whole value before decoding, so the
    allocation was dictated by the peer regardless of how few fields the envelope
    declares — and the heartbeat job probes up to 32 nodes concurrently on a 4s
    budget with no client-level timeout.
    
    The sibling RPC path already caps every node response at 64 MiB
    (readCappedBody in internal/web/runtime), so this was the one uncapped read
    of node-controlled data. A status envelope holds a handful of scalars, so the
    cap here is 1 MiB rather than the RPC figure.
    
    The peer is untrusted in the skip and pin TLS modes, and the same decode is
    reachable from the nodes test and probe endpoints.