diff options
author | Michael Kaye <1917473+michaelkaye@users.noreply.github.com> | 2019-04-04 17:30:37 +0100 |
---|---|---|
committer | Michael Kaye <1917473+michaelkaye@users.noreply.github.com> | 2019-04-04 17:30:37 +0100 |
commit | 3b082bf3b240d57d6590e6b83feeab7a1161793a (patch) | |
tree | 9e702aad992f35a7cb624daba0fd720dabd01792 | |
parent | Fix registration with register_mxid_from_3pid enabled (#5011) (diff) | |
download | synapse-3b082bf3b240d57d6590e6b83feeab7a1161793a.tar.xz |
Prevent exception when hs or shadow_hs missing
-rw-r--r-- | synapse/util/threepids.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/threepids.py b/synapse/util/threepids.py index e48c6201d0..3e2ecd488e 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',None) != hs.config.server_name + and data.get('shadow_hs',None) != hs.config.server_name ): defer.returnValue(False) |