diff options
author | Erik Johnston <erik@matrix.org> | 2014-10-17 19:37:41 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-10-17 19:37:41 +0100 |
commit | b3b19614962d78e7851299ff1f7b41706ced3d00 (patch) | |
tree | e5f361f10d133e68f478a0c622642d250d92750e /synapse/handlers/federation.py | |
parent | Use state groups to get current state. Make join dance actually work. (diff) | |
download | synapse-b3b19614962d78e7851299ff1f7b41706ced3d00.tar.xz |
Fix bug where people could join private rooms
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 70790aaa72..8c80a37164 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -269,12 +269,12 @@ class FederationHandler(BaseHandler): del self.room_queues[room_id] for p in room_queue: - p.outlier = True yield self.on_receive_pdu(p, backfilled=False) defer.returnValue(True) @defer.inlineCallbacks + @log_function def on_make_join_request(self, context, user_id): event = self.event_factory.create_event( etype=RoomMemberEvent.TYPE, @@ -289,15 +289,21 @@ class FederationHandler(BaseHandler): ) snapshot.fill_out_prev_events(event) + yield self.state_handler.annotate_state_groups(event) + yield self.auth.check(event, None, raises=True) + pdu = self.pdu_codec.pdu_from_event(event) defer.returnValue(pdu) @defer.inlineCallbacks + @log_function def on_send_join_request(self, origin, pdu): event = self.pdu_codec.event_from_pdu(pdu) - is_new_state= yield self.state_handler.annotate_state_groups(event) + event.outlier = False + + is_new_state = yield self.state_handler.annotate_state_groups(event) yield self.auth.check(event, None, raises=True) # FIXME (erikj): All this is duplicated above :( |