fix(web): support current Google Authenticator migration exports - #129
Merged
Merged
Conversation
miso-develop
marked this pull request as ready for review
September 16, 2026 02:09
Owner
Author
|
Integration handoff verification for exact head
Ready for Integration review. Do not merge from this implementation agent. |
Owner
Author
Integration review — APPROVE / MERGE READYReviewed exact head No blocking findings. Security / compatibility review
Exact-head verification
Integration decision: merge approved. Squash merge is appropriate for this scoped fix. |
This was referenced Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Web import compatibility with current Google Authenticator migration exports while preserving fail-closed parsing and the existing V1 security boundary.
Closes #128
Refs #12
Root cause
The original #12 implementation hard-coded top-level Google migration
version === 1. Public current-format evidence from late 2025 shows Google Authenticator exports usingversion = 2with the same established top-levelMigrationPayloadfield numbers/types. That causes a valid current export to reach protobuf decode successfully and then be rejected by M5Authenticator's metadata validation.Recent exports may also contain an additive
OtpParametersfield 8 (unique_id). The existing static protobuf decoder already ignores unknown fields safely, so this was not the rejection cause and no credential-bearing additional field is retained.A second semantic issue was identified:
batch_sizeis the number of QR chunks in a migration batch, not the number of accounts. The old implementation directly compared it withV1_MAX_ACCOUNTS.Public format references used for the investigation (no user export material):
Changes
1and2MigrationBatchAssembler/ImportSessionversion,batchSize,batchIndex) when metadata itself is unsupported/invalidSynthetic regression coverage
web/src/import/google-migration.test.tsnow covers:Security
Parallel-work evidence
task/128created from maincbb30802896e9bde81f26c12a0e3255d1436c2b7web/src/import/google-migration.tsand its testDo not merge from this implementation agent. Integration should review the exact-head CI results and security boundary before merge.