Skip to content

fix: 2FA secret QR code for Bitwarden/KeePassXC needs to be Base32 encoded instead Base64 - #516

Merged
dyc3 merged 1 commit into
dyc3:masterfrom
zhangcheng:master
Sep 2, 2026
Merged

fix: 2FA secret QR code for Bitwarden/KeePassXC needs to be Base32 encoded instead Base64#516
dyc3 merged 1 commit into
dyc3:masterfrom
zhangcheng:master

Conversation

@zhangcheng

Copy link
Copy Markdown
Contributor

This aims to fix #515.

Disclaimer: PR is done with help of coding agent.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The required Rust formatting check fails on the added test code; apply cargo fmt before merging.

Reviewed changes Reviewed the complete one-file change to QR payload generation and its tests.

  • Secret encoding — Converts decoded Steam shared-secret bytes to uppercase, unpadded RFC Base32 for Bitwarden and KeePassXC exports.
  • Payload extraction — Moves format-specific URI generation into QrCommand::qr_content so it can be exercised directly.
  • Coverage — Adds RFC Base32 vectors and checks both password-manager payloads while preserving the Steam URI path.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT Sol (free via Pullfrog for OSS) | 𝕏

Comment thread src/commands/qr.rs Outdated

@dyc3 dyc3 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dyc3
dyc3 merged commit 5006789 into dyc3:master Sep 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2FA secret QR code for Bitwarden/KeePassXC needs to be Base32 encoded instead Base64

2 participants