3x-ui/internal/util/common
MHSanaei 534afe13ab
fix(sub): treat external subscription providers as untrusted input
A client's external subscription is fetched from a third party on every
subscriber refresh, and the fetcher trusted it more than its siblings:
- it dialled any address, redirects included; it now goes through the
  SSRF guard like the outbound subscription and remote routing fetchers;
- it forwarded any line containing "://"; it now keeps only server share
  links, so app deeplinks and plain URLs never reach the subscriber's app;
- it bounded the body but not the link count (now 1000) or the headers
  (now 64 KiB), and stored the raw error, URL included, on every row; the
  stored error is now host-only and at most 1 KiB.

The link parser also refuses links that nest JSON past 16 levels, since
the JSON subscription pretty-prints it at quadratic cost, and external
configs are marshalled compactly until the final, single indent pass.
2026-10-31 08:53:27 +00:00
..
err.go fix(jobs): isolate per-node background goroutines from panics (#5397) 2026-06-20 00:38:25 +02:00
format.go fix(sub): treat external subscription providers as untrusted input 2026-10-31 08:53:27 +00:00
format_mutation_test.go
format_test.go perf: reduce traffic formatter allocations (#6790) 2026-10-12 11:05:40 +02:00
gorecover_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
multi_error.go
multi_error_test.go
url.go Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
url_test.go Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00