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.

This commit is contained in:
Erik Johnston 2014-09-03 19:07:19 +01:00
parent 284d6b279b
commit 5b645f9d34
1 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ from synapse.api.constants import Membership
from synapse.util.logutils import log_function from synapse.util.logutils import log_function
from synapse.federation.pdu_codec import PduCodec from synapse.federation.pdu_codec import PduCodec
from twisted.internet import defer from twisted.internet import defer, reactor
import logging import logging
@ -133,7 +133,7 @@ class FederationHandler(BaseHandler):
yield self.hs.get_handlers().room_member_handler.change_membership( yield self.hs.get_handlers().room_member_handler.change_membership(
new_event, new_event,
do_auth=True do_auth=False,
) )
else: else:
@ -231,6 +231,7 @@ class FederationHandler(BaseHandler):
# TODO (erikj): Time out here. # TODO (erikj): Time out here.
d = defer.Deferred() d = defer.Deferred()
self.waiting_for_join_list.setdefault((joinee, room_id), []).append(d) self.waiting_for_join_list.setdefault((joinee, room_id), []).append(d)
reactor.callLater(10, d.cancel)
yield d yield d
try: try: