Skip to content

v1.7.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 17:26
· 82 commits to main since this release
7ce7883

1.7.0

Fixed

  • both profile: 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 reads both.
    (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 — Start published 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-flaked TestAria_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,
    PermanentError alias, a duplicated Content-Range verification block),
    resume failures now warn once per task instead of being swallowed, and
    task.go split its resume/checkpoint half into resume_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) reached filepath.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 -o overrides are untouched. (internal/download)
  • RPC odm.shutdown bypassed 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 ≤ 0 caused 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 in AdjustConns. (internal/rpc, internal/download)
  • Negative --retry faked success — a config file with retry=-1 made
    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 in NewTask.
    (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)