Skip to content

Feat migration with uri#2

Merged
robby031 merged 5 commits into
mainfrom
feat_migration_with_URI
Jun 7, 2026
Merged

Feat migration with uri#2
robby031 merged 5 commits into
mainfrom
feat_migration_with_URI

Conversation

@robby031

@robby031 robby031 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7952cb6d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread base32.go Outdated
Comment on lines +68 to +70
v := buffer >> bitsLeft
if v < 0 || v > math.MaxUint8 {
return 0, ErrInvalidSecret

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Mask decoded bytes before range-checking

For any Base32 secret that emits more than one byte, buffer >> bitsLeft still includes previously consumed high bits, so this new > math.MaxUint8 check rejects valid secrets such as JBSWY3DPEHPK3PXP with ErrInvalidSecret. That breaks normal secret decoding and also makes migration URI building fail for valid accounts; the previous truncating cast worked because only the low 8 bits were written.

Useful? React with 👍 / 👎.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 336 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
migration.go 0.00% 318 Missing ⚠️
constant_time.go 0.00% 6 Missing ⚠️
base32.go 0.00% 4 Missing ⚠️
skew.go 0.00% 4 Missing ⚠️
totp.go 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@robby031 robby031 merged commit a4fa1d6 into main Jun 7, 2026
9 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.

2 participants