Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5024 from matrix-org/rav/record_correct_server_in…
Browse files Browse the repository at this point in the history
…_serverkeys

Fix from_server buglet in get_keys_from_perspectives
  • Loading branch information
richvdh authored Apr 8, 2019
2 parents 2d95168 + 7d2a0c8 commit 67d7b44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/5024.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Store the notary server name correctly in server_keys_json.
2 changes: 1 addition & 1 deletion synapse/crypto/keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ def process_v2_response(
self.store.store_server_keys_json,
server_name=server_name,
key_id=key_id,
from_server=server_name,
from_server=from_server,
ts_now_ms=time_now_ms,
ts_expires_ms=ts_valid_until_ms,
key_json_bytes=signed_key_json_bytes,
Expand Down
1 change: 1 addition & 0 deletions tests/crypto/test_keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ def post_json(destination, path, data, **kwargs):
self.assertEqual(len(res), 1)
res = res[0]
self.assertEqual(res["key_id"], testverifykey_id)
self.assertEqual(res["from_server"], self.mock_perspective_server.server_name)
self.assertEqual(res["ts_added_ms"], self.reactor.seconds() * 1000)
self.assertEqual(res["ts_valid_until_ms"], VALID_UNTIL_TS)

Expand Down

0 comments on commit 67d7b44

Please sign in to comment.