Skip to content

[Bug]: Updater accepts cached package after size validation fails #83

Closed

Description

@Kevinjohn

An updater package with a matching hash but the wrong manifest size is rejected once, then accepted from cache on the next attempt.

Frame version

0.31.1 (revision 04d8b085f01f6fc10239d4fd19232285c128c045)

Operating system

macOS 26.5.2 (25F84), Apple silicon

Source media details

N/A — this is isolated to updater package validation.

Steps to reproduce

  1. Serve a 14-byte update package.
  2. Set the asset metadata to the package's correct SHA-256 but declare sizeBytes: 15.
  3. Call UpdateClient::download twice with the same update metadata and cache directory.

Expected behavior

  • Attempt 1: reject the package with an asset-size mismatch.
  • Attempt 2: reject the package with the same mismatch.
  • Cache: no final package remains after either attempt.

Actual behavior

  • Attempt 1: rejects the size mismatch, but the package has already been moved into the final cache path.
  • Attempt 2: returns Ok(UpdatePackage { ... }) because the cache-hit path checks only the SHA-256.
  • Cache: the wrong-size package remains available for reuse.

Actual screenshot

The focused regression was run with Rust 1.95.0:

cargo test -p frame-updater download_rejects_size_mismatch_on_repeated_attempts -- --nocapture

Failing updater cache regression on revision 04d8b08

FFmpeg logs

N/A — FFmpeg is not involved.

Checklist

  • I searched the existing issues and did not find a duplicate.
  • I agree to follow this project's Code of Conduct.

Activity

  1. added a commit that references this issue on Aug 15, 2026
    2fef9eb
  2. added
    area:distribution
    bug
    and removed
    bug
    area:distribution
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions