Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/3727.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify that the `content` for `X-Matrix` signature validation is the parsed JSON body.
3 changes: 2 additions & 1 deletion content/server-server-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down Expand Up @@ -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)
Expand Down