summary refs log tree commit diff
path: root/synapse/rest/client/v1_only
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-31 10:49:14 +0100
committerNeil Johnson <neil@matrix.org>2018-08-31 10:49:14 +0100
commitea068d6f3cd5ed1bc9a39b2fd43e19d6d40f18da (patch)
tree149068aa0096858c2ad9ff661da4b5108f3a8f98 /synapse/rest/client/v1_only
parentPort storage/ to Python 3 (#3725) (diff)
downloadsynapse-ea068d6f3cd5ed1bc9a39b2fd43e19d6d40f18da.tar.xz
fix bug where preserved threepid user comes to sign up and server is mau blocked
Diffstat (limited to 'synapse/rest/client/v1_only')
-rw-r--r--synapse/rest/client/v1_only/register.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/rest/client/v1_only/register.py b/synapse/rest/client/v1_only/register.py
index 5e99cffbcb..2c7bbcb171 100644
--- a/synapse/rest/client/v1_only/register.py
+++ b/synapse/rest/client/v1_only/register.py
@@ -281,11 +281,15 @@ class RegisterRestServlet(ClientV1RestServlet):
             register_json["user"].encode("utf-8")
             if "user" in register_json else None
         )
+        threepid = None
+        if session[LoginType.EMAIL_IDENTITY]:
+            threepid = session["threepidCreds"]
 
         handler = self.handlers.registration_handler
         (user_id, token) = yield handler.register(
             localpart=desired_user_id,
-            password=password
+            password=password,
+            threepid=threepid,
         )
 
         if session[LoginType.EMAIL_IDENTITY]: