3x-ui/internal
n0ctal b0ef60670c
fix(runtime): cap remote node response size to bound master memory (#5361)
Remote node HTTP responses were read with an unbounded io.ReadAll, so a
broken or hostile node could force the master panel to buffer an arbitrarily
large body. The single Remote.do choke point that all node calls funnel
through now:
  - validates the HTTP status before reading any success payload (a non-OK
    body is only read up to a small bounded diagnostic snippet, so a node
    cannot make the master buffer a large body just to return an error);
  - fast-fails on an honestly-declared oversize Content-Length;
  - reads the success body through readCappedBody, an io.LimitReader cap
    (64 MiB) that rejects oversize with a typed error.

The 64 MiB cap bounds one response's wire/decompressed size; it is documented
as not a process-wide memory bound (endpoint-specific caps and a concurrency
budget remain follow-ups).

Tests cover the cap+1 boundary, an oversize streamed body, a normal envelope,
and non-OK status precedence.
2026-06-20 00:38:52 +02:00
..
config Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
database refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
eventbus feat(notifications): event bus architecture with Telegram and SMTP subscribers (#5326) 2026-06-15 21:03:41 +02:00
logger refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
mtproto refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
sub refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
util fix(jobs): isolate per-node background goroutines from panics (#5397) 2026-06-20 00:38:25 +02:00
web fix(runtime): cap remote node response size to bound master memory (#5361) 2026-06-20 00:38:52 +02:00
xray fix(xray): guard process lifecycle fields against concurrent access (#5395) 2026-06-20 00:37:03 +02:00