summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-27 13:53:31 +0000
committerErik Johnston <erik@matrix.org>2014-11-27 13:53:31 +0000
commitb8849c8cbf7666688d26a0503ddd678fba56425c (patch)
tree432056ff6cea9aa3a7c8caf466acd02848507d72 /synapse
parentAttempt to fix bug where we 500d an event stream due to trying to cancel a ti... (diff)
downloadsynapse-b8849c8cbf7666688d26a0503ddd678fba56425c.tar.xz
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
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index fcef602055..7903494e08 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,