summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2019-04-04 17:45:12 +0100
committerGitHub <noreply@github.com>2019-04-04 17:45:12 +0100
commitdd747ba0458db644c0d2cd36f2f8635560d994fb (patch)
tree16fbd4865c62138096085338a8550737d1ca9c67 /synapse/util
parentFix registration with register_mxid_from_3pid enabled (#5011) (diff)
downloadsynapse-dd747ba0458db644c0d2cd36f2f8635560d994fb.tar.xz
Prevent exception when hs or shadow_hs missing (#5012) dinsic_2019-04-04_2
* Prevent exception when hs or shadow_hs missing
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/threepids.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/threepids.py b/synapse/util/threepids.py
index e48c6201d0..4cc7d27ce5 100644
--- a/synapse/util/threepids.py
+++ b/synapse/util/threepids.py
@@ -49,8 +49,8 @@ def check_3pid_allowed(hs, medium, address):
 
         # Check if this user is intended to register for this homeserver
         if (
-            data['hs'] != hs.config.server_name
-            and data['shadow_hs'] != hs.config.server_name
+            data.get('hs') != hs.config.server_name
+            and data.get('shadow_hs') != hs.config.server_name
         ):
             defer.returnValue(False)