summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-10-31 14:08:51 +0000
committerErik Johnston <erik@matrix.org>2023-10-31 14:08:51 +0000
commit1f033ad5e4b22db5d0873565e68e44a25054ddff (patch)
treee664889cfe41661308d435cd97e1cf8d2fc040ea /synapse/handlers/device.py
parentRevert "1.96.0rc1" (diff)
parentMerge branch 'release-v1.95' into develop (diff)
downloadsynapse-1f033ad5e4b22db5d0873565e68e44a25054ddff.tar.xz
Merge remote-tracking branch 'origin/develop' into release-v1.96
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 3ce96ef3cb..93472d0117 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -328,6 +328,9 @@ class DeviceWorkerHandler:
         return result
 
     async def on_federation_query_user_devices(self, user_id: str) -> JsonDict:
+        if not self.hs.is_mine(UserID.from_string(user_id)):
+            raise SynapseError(400, "User is not hosted on this homeserver")
+
         stream_id, devices = await self.store.get_e2e_device_keys_for_federation_query(
             user_id
         )