From a41fe500d6ea975e628a4ba6aa14997592af9843 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 7 Apr 2017 10:03:48 +0100 Subject: [PATCH 1/3] Bump version and changelog --- CHANGES.rst | 9 +++++++++ synapse/__init__.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 6659c6671a..61512db418 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +Changes in synapse v0.20.0 (2017-04-07) +======================================= + +Bug fixes: + +* Fix joining rooms over federation where not all servers in the room saw the + new server had joined (PR #2094) + + Changes in synapse v0.20.0-rc1 (2017-03-30) =========================================== diff --git a/synapse/__init__.py b/synapse/__init__.py index 580927abf4..2e5f4e0ead 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a Matrix home server. """ -__version__ = "0.20.0-rc1" +__version__ = "0.20.0" From 64765e51996382c633a7bcf0f8fd26b3ec20e15d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 7 Apr 2017 14:39:32 +0100 Subject: [PATCH 2/3] When we do an invite rejection, save the signed leave event to the db During a rejection of an invite received over federation, we ask a remote server to make us a `leave` event, then sign it, then send that with `send_leave`. We were saving the *unsigned* version of the event (which has a different event id to the signed version) to our db (and sending it to the clients), whereas other servers in the room will have seen the *signed* version. We're not aware of any actual problems that caused, except that it makes the database confusing to look at and generally leaves the room in a weird state. --- synapse/handlers/federation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 2ecc0087b8..53f9296399 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1101,15 +1101,15 @@ class FederationHandler(BaseHandler): user_id, "leave" ) - signed_event = self._sign_event(event) + event = self._sign_event(event) except SynapseError: raise except CodeMessageException as e: logger.warn("Failed to reject invite: %s", e) raise SynapseError(500, "Failed to reject invite") - # Try the host we successfully got a response to /make_join/ - # request first. + # Try the host that we succesfully called /make_leave/ on first for + # the /send_leave/ request. try: target_hosts.remove(origin) target_hosts.insert(0, origin) @@ -1119,7 +1119,7 @@ class FederationHandler(BaseHandler): try: yield self.replication_layer.send_leave( target_hosts, - signed_event + event ) except SynapseError: raise From d563b8d944e322d477eb0814ea06a82c0c44270f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 11 Apr 2017 11:12:13 +0100 Subject: [PATCH 3/3] Bump changelog --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 61512db418..6c85241eaf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -Changes in synapse v0.20.0 (2017-04-07) +Changes in synapse v0.20.0 (2017-04-11) ======================================= Bug fixes: