Repository navigation
v1.7.0
1.7.0
Fixed
bothprofile: region1 now really runs on HTTP/1.1 — the h2-enabled
client was handed to the whole task, so region1's work-stealing engine
collapsed onto one multiplexed TCP stream and silently wasted half the
connection budget. Client routing is now by engine kind: static-split
(aria2c-model) engines ride h2 when available; fixed-chunk work-stealing
engines always keep N separate h1 connections — including degraded
single-region layouts whose profile string still readsboth.
(internal/download)- UI data race between engine logs and the redraw loop — log lines
interjected during a live frame could read torn renderer state
(cur.live/startedAt) written unlocked by the frame loop; under the Go
memory model this is a real race even if it never visibly corrupted a
frame. All last-seen state is now written only under the renderer lock.
(internal/ui) - aria2c display cap race —
Startpublished the raw connection budget
before capping it to the segment count, so UI/RPC pollers could briefly
see e.g.[x16]for a 4-segment file; the cap is computed first and
stored once. Also de-flakedTestAria_ConnsDisplayCappedToSplit, which
sampled that window ~50% of the time locally. (internal/download)
Changed
- Development workflow is now TDD (red → green → refactor), documented
in AGENTS.md. - Housekeeping: removed dead code (
ExecOptions.MaxConn,
PermanentErroralias, a duplicated Content-Range verification block),
resume failures now warn once per task instead of being swallowed, and
task.gosplit its resume/checkpoint half intoresume_impl.go
(movement only).
Fixed
Results of audit round 2 (1 critical, 4 high — all fixed with regression
tests):
- Path traversal via server-controlled filename — a Content-Disposition
or URL basename containing../(or separators) reachedfilepath.Join
raw, so a hostile server (or an RPC client on--rpc-listen-all) could
write the download body anywhere the process can — including dotfiles in
the user's home. Filenames are flattened to a single path component before
joining; explicit-ooverrides are untouched. (internal/download) - RPC
odm.shutdownbypassed auth — shutdown detection ran on the raw
request while auth was checked inside dispatch, so an unauthenticated POST
got an auth-error response and still killed the daemon, cancelling all
in-flight downloads. Detection is now gated on the same secret check.
(internal/rpc) - RPC
changeOption connections ≤ 0caused silent data loss — target 0
retired every worker via the graceful drain while chunks remained queued;
Start reported the half-downloaded file as completed and deleted its
control file, making resume impossible. Values < 1 are rejected at the RPC
boundary and clamped inAdjustConns. (internal/rpc,internal/download) - Negative
--retryfaked success — a config file withretry=-1made
the per-chunk attempt loop run zero iterations: chunks "succeeded" without
a single byte downloaded and control files were deleted. Rejected by
config validation; clamped defensively inNewTask.
(internal/config,internal/download) - Last-completion tally race in the scheduler — completion reports post
to the scheduler channel after the WaitGroup release, so when the final
tasks finished back-to-back, Run could return on its done path with one
report still buffered — wrong summary line, wrong exit code, missing RPC
completion event. The done path now drains the buffer first.
(internal/scheduler)