Repository navigation
Require signatures to cover this site and the body - #3977
Merged
Merged
Conversation
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.
Fixes #
Proposed changes:
hostfor draft-cavage signatures, and@target-uri,@authorityorhostfor RFC 9421 signatures.digestorcontent-digest), and the header has to be sent.DigestorContent-Digestheader is now compared with the body whenever it is sent, also for an empty body.Other information:
I checked which headers other implementations sign. For draft-cavage, Mastodon, Misskey, GoToSocial, Lemmy, Pixelfed, PeerTube and Friendica all sign
host, anddigeston POST. For RFC 9421, Mastodon, Fedify, Bonfire and tootik all cover@target-uri, andcontent-digestwith a body. Mastodon and tootik already reject RFC 9421 signatures without@target-uri, and Mastodon requires a signed digest on POST. So this should not break federation with them. I did not check Hubzilla, streams and Forte.Testing instructions:
vendor/bin/phpunit --filter 'requires_covered_components|requires_signed_headers'. The new cases sign by hand, because the plugin's own signer always signs everything.Changelog entry
Changelog Entry Details
Significance
Type
Message