mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-12 04:52:26 +01:00
Fix fetching signing keys when old_verify_keys
is omitted (#17568)
`old_verify_keys` isn't marked as required in https://spec.matrix.org/v1.11/server-server-api/#get_matrixkeyv2server and there's no functional difference between an empty object and omitting the object, so I don't think there's any reason synapse should explode when the field is omitted.
This commit is contained in:
parent
1892ba5f67
commit
f77bfbfa30
2 changed files with 2 additions and 1 deletions
1
changelog.d/17568.bugfix
Normal file
1
changelog.d/17568.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix fetching federation signing keys from servers that omit `old_verify_keys`. Contributed by @tulir @ Beeper.
|
|
@ -589,7 +589,7 @@ class BaseV2KeyFetcher(KeyFetcher):
|
|||
% (server_name,)
|
||||
)
|
||||
|
||||
for key_id, key_data in response_json["old_verify_keys"].items():
|
||||
for key_id, key_data in response_json.get("old_verify_keys", {}).items():
|
||||
if is_signing_algorithm_supported(key_id):
|
||||
key_base64 = key_data["key"]
|
||||
key_bytes = decode_base64(key_base64)
|
||||
|
|
Loading…
Reference in a new issue