summary refs log tree commit diff
path: root/synapse/storage/databases/main
diff options
context:
space:
mode:
authorAaron Raimist <aaron@raim.ist>2021-05-11 08:03:23 -0500
committerGitHub <noreply@github.com>2021-05-11 14:03:23 +0100
commitdc6366a9bd370a0f772f376a2053c0ce48cb6607 (patch)
tree79b857378e42988bfed8ef2d65b883473f73e820 /synapse/storage/databases/main
parentAdd debug logging for issue #9533 (#9959) (diff)
downloadsynapse-dc6366a9bd370a0f772f376a2053c0ce48cb6607.tar.xz
Add config option to hide device names over federation (#9945)
Now that cross signing exists there is much less of a need for other people to look at devices and verify them individually. This PR adds a config option to allow you to prevent device display names from being shared with other servers.

Signed-off-by: Aaron Raimist <aaron@raim.ist>
Diffstat (limited to 'synapse/storage/databases/main')
-rw-r--r--synapse/storage/databases/main/end_to_end_keys.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/end_to_end_keys.py b/synapse/storage/databases/main/end_to_end_keys.py
index 88afe97c41..398d6b6acb 100644
--- a/synapse/storage/databases/main/end_to_end_keys.py
+++ b/synapse/storage/databases/main/end_to_end_keys.py
@@ -84,7 +84,9 @@ class EndToEndKeyWorkerStore(EndToEndKeyBackgroundStore):
                 if keys:
                     result["keys"] = keys
 
-                device_display_name = device.display_name
+                device_display_name = None
+                if self.hs.config.allow_device_name_lookup_over_federation:
+                    device_display_name = device.display_name
                 if device_display_name:
                     result["device_display_name"] = device_display_name