3x-ui/internal
n0ctal 2bb851dd50
fix(xray): verify the release archive checksum before installing (#5396)
* fix(xray): verify the release archive checksum before installing

UpdateXray downloaded the Xray-core release zip and installed the binary
from it after only a TLS fetch, an HTTP-200 check and a size cap — the
archive itself was never verified, so a corrupted or tampered release
asset would be extracted and run as the panel's xray binary.

Verify the downloaded archive against the SHA2-256 published in the
release's .dgst sidecar (which XTLS ships next to every asset) before
installing, and abort the update on mismatch, a missing/short SHA2-256
entry, or an unreachable .dgst. The digest parser and fetch are covered by
tests, including the real .dgst line format ("SHA2-256= <hex>").

* address review: clearer warning + re-download guidance on checksum mismatch

Per review feedback on the PR: on a SHA-256 mismatch, surface a plain-language
warning that the downloaded archive is corrupted or differs from the official
release and that the user should exit and re-download, instead of a terse
"checksum mismatch" error. The install still aborts so a mismatched binary is
never run; the message now tells the user the safe next step.
2026-06-20 00:37:35 +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 refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
web fix(xray): verify the release archive checksum before installing (#5396) 2026-06-20 00:37:35 +02:00
xray fix(xray): guard process lifecycle fields against concurrent access (#5395) 2026-06-20 00:37:03 +02:00