summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha
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/v2_alpha
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/v2_alpha')
-rw-r--r--synapse/rest/client/v2_alpha/register.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index 2f64155d13..45113e5386 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -395,11 +395,16 @@ class RegisterRestServlet(RestServlet):
             if desired_username is not None:
                 desired_username = desired_username.lower()
 
+            threepid = None
+            if auth_result:
+                threepid = auth_result.get(LoginType.EMAIL_IDENTITY)
+
             (registered_user_id, _) = yield self.registration_handler.register(
                 localpart=desired_username,
                 password=new_password,
                 guest_access_token=guest_access_token,
                 generate_token=False,
+                threepid=threepid,
             )
 
             # remember that we've now registered that user account, and with