Skip to content

Commit 8a0a799

Browse files
authored
Clarify that the X-Matrix validation uses the parsed request body (#3727)
1 parent 9e4b170 commit 8a0a799

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify that the `content` for `X-Matrix` signature validation is the parsed JSON body.

content/server-server-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Step 1 sign JSON:
237237
"uri": "/target",
238238
"origin": "origin.hs.example.com",
239239
"destination": "destination.hs.example.com",
240-
"content": <request body>,
240+
"content": <JSON-parsed request body>,
241241
"signatures": {
242242
"origin.hs.example.com": {
243243
"ed25519:key1": "ABCDEF..."
@@ -274,6 +274,7 @@ def authorization_headers(origin_name, origin_signing_key,
274274
}
275275

276276
if content is not None:
277+
# Assuming content is already parsed as JSON
277278
request_json["content"] = content
278279

279280
signed_json = sign_json(request_json, origin_name, origin_signing_key)

0 commit comments

Comments
 (0)