From b8849c8cbf7666688d26a0503ddd678fba56425c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 27 Nov 2014 13:53:31 +0000 Subject: [PATCH] Re-sign events when we return them via federation as a temporary hack to work around the problem where we reconstruct events differently than when they were signed --- synapse/handlers/federation.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index fcef60205..7903494e0 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -540,6 +540,17 @@ class FederationHandler(BaseHandler): ) if event: + # FIXME: This is a temporary work around where we occasionally + # return events slightly differently than when they were + # originally signed + event.signatures.update( + compute_event_signature( + event, + self.hs.hostname, + self.hs.config.signing_key[0] + ) + ) + if do_auth: in_room = yield self.auth.check_host_in_room( event.room_id,