Skip to content

[Bug][Web] Decode dense Google Authenticator multi-account migration QR images #130

Description

@miso-develop

Problem

Production GitHub Pages can decode a Google Authenticator migration QR containing a small/single-account export, but a real Google Authenticator multi-account migration QR screenshot fails before migration parsing with:

No supported QR code could be decoded from the selected image.

No real QR image, migration URI, protobuf payload, Base64, secret, account name, issuer, or other authentication material is attached to this Issue or should be added later.

Current state

Required behavior

A local screenshot/image containing one Google Authenticator migration QR that encodes multiple accounts must decode reliably enough for the existing migration parser/session to process it.

This Issue concerns one QR symbol carrying a denser multi-account migration payload. It does not require decoding multiple independent QR symbols from one collage/image.

Existing multi-part export behavior (1/N, 2/N, etc.) must continue to work by importing each QR image separately into the same import session.

Investigation direction

Determine why the current ZXing image path fails on dense migration QR screenshots and implement the smallest robust local-only fallback/preprocessing strategy. Candidate approaches may include, based on evidence:

  • bounded image-scale pyramid / nearest-neighbor upscaling before decode;
  • bounded crop/quiet-zone handling where safe;
  • additional luminance/binarization variants;
  • inversion/contrast-safe fallback where justified;
  • Chrome-native/local decoder fallback only if it preserves deterministic local-only/privacy behavior and has explicit regression coverage.

Do not blindly add unbounded retries or expensive image transforms. Keep memory/runtime bounded.

Regression coverage

Use synthetic-only test data. Do not use or commit a real Google Authenticator export.

Add coverage for at least:

  • a synthetic migration payload containing multiple accounts and enough payload density to produce a materially denser QR than the current small fixture;
  • browser/image-level decode of that generated/rasterized dense QR;
  • legacy/small QR continues to decode;
  • unsupported/non-QR image remains fail-closed;
  • temporary pixel buffers are cleared as today;
  • decoded migration payload still flows through existing version/profile/account-limit validation;
  • multi-part batch import remains unchanged.

Prefer generating fixtures deterministically from synthetic secrets/account labels at test time or from clearly synthetic checked-in fixtures that contain no real credentials.

Security/privacy constraints

  • All QR decoding stays local in the browser.
  • No runtime network/API/service for QR decoding.
  • No persistent plaintext QR image/payload/account/secret storage.
  • No logging/telemetry of decoded URI, Base64, protobuf bytes, secrets, account names, issuers, or recovery material.
  • Error diagnostics must remain secret-free.
  • Preserve cleanup/zeroization of temporary image/payload/account secret buffers.
  • Do not relax migration metadata/profile validation added by [Bug] Fix compatibility with current Google Authenticator migration exports #128/fix(web): support current Google Authenticator migration exports #129.
  • No firmware, Protocol, Vault format, Recovery, eFuse, or Device behavior change.
  • Avoid dependency/lockfile changes unless the implementation cannot be made robust with the existing decoder; if a dependency change is proposed, justify it explicitly in the PR.

Acceptance criteria

  • Synthetic dense multi-account Google Authenticator migration QR image decodes in Web tests/Chrome smoke.
  • Existing small/single-account QR decode remains green.
  • Existing multi-part migration batch behavior remains green.
  • No real authentication material is added to repository/Issue/PR/CI logs.
  • Failure remains fail-closed when no valid QR can be decoded.
  • No runtime network or plaintext persistence is introduced.
  • No firmware/Protocol/Vault/eFuse changes.
  • Foundation, Web tests/build, Linux Chrome QR smoke, Windows Chrome QR smoke, and Security checks pass on exact head.

Related

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions