diff options
author | Erik Johnston <erik@matrix.org> | 2023-10-31 14:08:51 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2023-10-31 14:08:51 +0000 |
commit | 1f033ad5e4b22db5d0873565e68e44a25054ddff (patch) | |
tree | e664889cfe41661308d435cd97e1cf8d2fc040ea /synapse/handlers/e2e_keys.py | |
parent | Revert "1.96.0rc1" (diff) | |
parent | Merge branch 'release-v1.95' into develop (diff) | |
download | synapse-1f033ad5e4b22db5d0873565e68e44a25054ddff.tar.xz |
Merge remote-tracking branch 'origin/develop' into release-v1.96
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r-- | synapse/handlers/e2e_keys.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index d340d4aebe..d06524495f 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -542,6 +542,12 @@ class E2eKeysHandler: device_keys_query: Dict[str, Optional[List[str]]] = query_body.get( "device_keys", {} ) + if any( + not self.is_mine(UserID.from_string(user_id)) + for user_id in device_keys_query + ): + raise SynapseError(400, "User is not hosted on this homeserver") + res = await self.query_local_devices( device_keys_query, include_displaynames=( |