Feat migration with uri#2
Conversation
There was a problem hiding this comment.
💡 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".
| v := buffer >> bitsLeft | ||
| if v < 0 || v > math.MaxUint8 { | ||
| return 0, ErrInvalidSecret |
There was a problem hiding this comment.
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
No description provided.