summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2019-01-24 13:02:50 +0000
committerGitHub <noreply@github.com>2019-01-24 13:02:50 +0000
commit10b89d5c2e994e280da6957af7560b2d84ce6048 (patch)
treee7756ca331a3b1ba775a87e8db4f715e8b10a68c /synapse/config
parentMerge pull request #4458 from matrix-org/dbkr/public_baseurl_doc (diff)
parentmove guard out of is_threepid_reserved and into register.py (diff)
downloadsynapse-10b89d5c2e994e280da6957af7560b2d84ce6048.tar.xz
Merge pull request #4435 from matrix-org/neilj/fix_threepid_auth_check
Neilj/fix threepid auth check
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/server.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index bc97b44a5b..22dcc87d8a 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -424,19 +424,18 @@ class ServerConfig(Config):
                                   " service on the given port.")
 
 
-def is_threepid_reserved(config, threepid):
+def is_threepid_reserved(reserved_threepids, threepid):
     """Check the threepid against the reserved threepid config
     Args:
-        config(ServerConfig) - to access server config attributes
+        reserved_threepids([dict]) - list of reserved threepids
         threepid(dict) - The threepid to test for
 
     Returns:
         boolean Is the threepid undertest reserved_user
     """
 
-    for tp in config.mau_limits_reserved_threepids:
-        if (threepid['medium'] == tp['medium']
-                and threepid['address'] == tp['address']):
+    for tp in reserved_threepids:
+        if (threepid['medium'] == tp['medium'] and threepid['address'] == tp['address']):
             return True
     return False