Skip to content
Snippets Groups Projects
Commit 62d7d66a authored by Matthew Hodgson's avatar Matthew Hodgson
Browse files

oops, check all login types

parent 8fe253f1
Branches
Tags
No related merge requests found
...@@ -365,20 +365,17 @@ class RegisterRestServlet(RestServlet): ...@@ -365,20 +365,17 @@ class RegisterRestServlet(RestServlet):
# /register/email/requestToken when we requested a 3pid, but that's not # /register/email/requestToken when we requested a 3pid, but that's not
# guaranteed. # guaranteed.
if ( if auth_result:
auth_result and for login_type in [LoginType.EMAIL_IDENTITY, LoginType.EMAIL_MSISDN]:
( if login_type in auth_result:
LoginType.EMAIL_IDENTITY in auth_result or medium = auth_result[login_type].threepid['medium']
LoginType.EMAIL_MSISDN in auth_result address = auth_result[login_type].threepid['address']
)
): if not check_3pid_allowed(self.hs, medium, address):
medium = auth_result[LoginType.EMAIL_IDENTITY].threepid['medium'] raise SynapseError(
address = auth_result[LoginType.EMAIL_IDENTITY].threepid['address'] 403, "Third party identifier is not allowed",
Codes.THREEPID_DENIED,
if not check_3pid_allowed(self.hs, medium, address): )
raise SynapseError(
403, "Third party identifier is not allowed", Codes.THREEPID_DENIED,
)
if registered_user_id is not None: if registered_user_id is not None:
logger.info( logger.info(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment