diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-17 14:47:33 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-17 14:47:33 +0100 |
commit | 2884712ca733f45d32468ecf2ede7a1518e85be4 (patch) | |
tree | 4137f4d0be9fce3413e40d5ecfdee74b567b94bb /synapse/federation | |
parent | Merge pull request #874 from matrix-org/markjh/worker_config (diff) | |
download | synapse-2884712ca733f45d32468ecf2ede7a1518e85be4.tar.xz |
Only re-sign our own events
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_server.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index fe92457ba1..2a589524a4 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -193,13 +193,16 @@ class FederationServer(FederationBase): ) for event in auth_chain: - event.signatures.update( - compute_event_signature( - event, - self.hs.hostname, - self.hs.config.signing_key[0] + # We sign these again because there was a bug where we + # incorrectly signed things the first time round + if self.hs.is_mine_id(event.event_id): + event.signatures.update( + compute_event_signature( + event, + self.hs.hostname, + self.hs.config.signing_key[0] + ) ) - ) else: raise NotImplementedError("Specify an event") |