mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 15:24:09 -04:00
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
This commit is contained in:
parent
37935b5183
commit
8afb7b55d0
4 changed files with 35 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue