fix: support 'auth' header type and raw-byte signature encoding - #552
Open
dajiaohuang wants to merge 2 commits into
Open
fix: support 'auth' header type and raw-byte signature encoding#552dajiaohuang wants to merge 2 commits into
dajiaohuang wants to merge 2 commits into
Conversation
- Add 'auth' to accepted header types in decodeHeader - Support both ASCII-hex and raw-byte signature encodings in decodeCustodyTypeSignature Fixes framesjs#551
|
@dajiaohuang is attempting to deploy a commit to the Discove Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Addressed the current review feedback in 4121a93. Auth signatures now return after message verification instead of being compared to custodyOf(fid), which rejects delegated auth addresses; odd-length ASCII hex signatures remain decoded as hex. Validation: git diff --check passed. The local checkout has no Yarn binary/dependencies, so the package test suite could not run here. |
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
This PR fixes two bugs in the JSON signature verification that cause 78% of live mini app manifests to be incorrectly rejected.
Bug 1: 'auth' header type is rejected
The function only accepted and types, but the spec also allows . This PR adds to the accepted types.
Bug 2: Raw-byte signature encoding not supported
The function only accepted ASCII-hex encoded signatures (e.g., ), but many live manifests use raw 65-byte signatures encoded as base64url. This PR detects the encoding format and handles both cases.
Changes
Testing
The fix allows the previously rejected valid signatures to be verified correctly.
Fixes #551