summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorHubert Chathi <hubertc@matrix.org>2022-05-18 06:19:30 -0400
committerGitHub <noreply@github.com>2022-05-18 11:19:30 +0100
commit8afb7b55d0527f8c6af7690b162ebaabe9b5d9f5 (patch)
treee2c360534b4a76cea7c928c3177d458a6cb261ca /synapse/http
parentMove methods that call add_push_rule to PushRuleStore (#12772) (diff)
downloadsynapse-8afb7b55d0527f8c6af7690b162ebaabe9b5d9f5.tar.xz
Make handling of federation Authorization header (more) compliant with RFC7230 (#12774)
The main differences are:
- values with delimiters (such as colons) should be quoted, so always
  quote the origin, since it could contain a colon followed by a port
  number
- should allow more than one space after "X-Matrix"
- quoted values with backslash-escaped characters should be unescaped
- names should be case insensitive
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/matrixfederationclient.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 725b5c33b8..0b9475debd 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -747,7 +747,7 @@ class MatrixFederationHttpClient:
         for key, sig in request["signatures"][self.server_name].items():
             auth_headers.append(
                 (
-                    'X-Matrix origin=%s,key="%s",sig="%s",destination="%s"'
+                    'X-Matrix origin="%s",key="%s",sig="%s",destination="%s"'
                     % (
                         self.server_name,
                         key,