Clarify that the X-Matrix validation uses the parsed request body (#3727)

pull/3731/head
Travis Ralston 2 years ago committed by GitHub
parent 9e4b170643
commit 8a0a799a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Clarify that the `content` for `X-Matrix` signature validation is the parsed JSON body.

@ -237,7 +237,7 @@ Step 1 sign JSON:
"uri": "/target",
"origin": "origin.hs.example.com",
"destination": "destination.hs.example.com",
"content": <request body>,
"content": <JSON-parsed request body>,
"signatures": {
"origin.hs.example.com": {
"ed25519:key1": "ABCDEF..."
@ -274,6 +274,7 @@ def authorization_headers(origin_name, origin_signing_key,
}
if content is not None:
# Assuming content is already parsed as JSON
request_json["content"] = content
signed_json = sign_json(request_json, origin_name, origin_signing_key)

Loading…
Cancel
Save