summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-03 19:07:19 +0100
committerErik Johnston <erik@matrix.org>2014-09-03 19:08:39 +0100
commit5b645f9d3458060a55d84c3b9b8938d877c41da6 (patch)
tree13710a3bfe429055c4fef8c8a6661e84ab82e3bc /synapse/handlers/federation.py
parentHide email link UI from the settings because it doesn't work. (diff)
downloadsynapse-5b645f9d3458060a55d84c3b9b8938d877c41da6.tar.xz
Don't do auth for change_membership in federation handler, it doesn't work and federation doesn't do auth in general either. Add a hacky timeout when trying to join a remote room.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r--synapse/handlers/federation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 84059d8033..2b09a410f4 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -22,7 +22,7 @@ from synapse.api.constants import Membership
 from synapse.util.logutils import log_function
 from synapse.federation.pdu_codec import PduCodec
 
-from twisted.internet import defer
+from twisted.internet import defer, reactor
 
 import logging
 
@@ -133,7 +133,7 @@ class FederationHandler(BaseHandler):
 
             yield self.hs.get_handlers().room_member_handler.change_membership(
                 new_event,
-                do_auth=True
+                do_auth=False,
             )
 
         else:
@@ -231,6 +231,7 @@ class FederationHandler(BaseHandler):
         # TODO (erikj): Time out here.
         d = defer.Deferred()
         self.waiting_for_join_list.setdefault((joinee, room_id), []).append(d)
+        reactor.callLater(10, d.cancel)
         yield d
 
         try: