summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-04-16 17:23:28 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-04-16 17:23:28 +0100
commitc215378411ab7604e8687b60e2dca7c2391271ba (patch)
treea3ddd4e337986df78f294557a55ab1472cc54e38
parentUse query_user_devices instead, assume only master, self_signing key types (diff)
downloadsynapse-c215378411ab7604e8687b60e2dca7c2391271ba.tar.xz
Make changelog more useful
-rw-r--r--changelog.d/7289.bugfix2
-rw-r--r--synapse/handlers/e2e_keys.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/changelog.d/7289.bugfix b/changelog.d/7289.bugfix
index e3c96dba95..5b4fbd77ac 100644
--- a/changelog.d/7289.bugfix
+++ b/changelog.d/7289.bugfix
@@ -1 +1 @@
-Query remote user's cross-signing keys on local user cross-signing signature upload if necessary.
\ No newline at end of file
+Fix an edge-case where it was not possible to cross-sign a user which did not share a room with any user on your homeserver. The bug only affected Synapse deployments in worker mode.
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index f92544c731..fee1f9d509 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -973,6 +973,8 @@ class E2eKeysHandler(object):
         self, user_id, desired_key_type, from_user_id=None
     ):
         """Fetch the cross-signing public key from storage and interpret it.
+        If we cannot find the public key locally, we query the keys from the
+        homeserver they belong to, then update our local copy.
 
         Args:
             user_id (str): the user whose key should be fetched
@@ -994,11 +996,10 @@ class E2eKeysHandler(object):
 
         # If we still can't find the key, and we're looking for keys of another user,
         # then attempt to fetch the missing key from the remote user's server.
-        #
-        # We don't get "user_signing" keys from remote servers, so disallow that here
         if (
             key is None
             and not self.is_mine(user)
+            # We don't get "user_signing" keys from remote servers, so disallow that here
             and desired_key_type != "user_signing"
         ):
             try: