fix(picky)!: comply with draft-cavage-http-signatures-12 when signing HTTP messages#351
Merged
Benoît Cortier (CBenoit) merged 1 commit intoDevolutions:masterfrom Mar 3, 2025
Conversation
…tures-12 when signing HTTP methods. For reasons unclear to me, the `http-signature` module treats the request target specially in that it is added to & read from the signing string with no header name (unlike, say, `(created)` or `(expires)`). As we see [here](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12#page-9), it, too, has a "psuedo-header" name: `(request-target)`. It's absence from the signing string was breaking my attempts to use picky to validate message signatures from Mastodon.
Benoît Cortier (CBenoit)
approved these changes
Mar 3, 2025
Member
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
Thank you! It is a you said. Probably something was misunderstood at the time. Let’s merge this compliant version of the code. We’ll advertise this as a breaking change for the next major release.
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.
Not sure if picky is attempting to be compliant with "draft-cavage-http-signatures-12" (i.e. the algorithm used throughout the Fediverse), or not. If so, the request target field in the signing string gets its own "pseudo-header name":
(request-target). This PR changes that & updates the test suite accordingly.Commit message follows:
For reasons unclear to me, the
http-signaturemodule treats the request target specially in that it is added to & read from the signing string with no header name (unlike, say,(created)or(expires)). As we see here, it, too, has a "psuedo-header" name:(request-target).It's absence from the signing string was breaking my attempts to use picky to validate message signatures from Mastodon.