From d36bfdd64d8aad417454a787548f4d458b8a0fec Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 29 Jan 2021 14:41:56 +0000 Subject: [PATCH] Remove riot email registration backwards compatibility hack This was causing a LoginError to be propagated up to the registration servlet, which was expecting a InteractiveAuthIncompleteError in order to store a password_hash from the client for the session. DINUM relies on this happening. More info here: https://github.com/matrix-org/synapse/issues/9263 --- synapse/handlers/auth.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index c7dc07008a..143d12b48d 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -518,16 +518,6 @@ class AuthHandler(BaseHandler): session.session_id, login_type, result ) except LoginError as e: - if login_type == LoginType.EMAIL_IDENTITY: - # riot used to have a bug where it would request a new - # validation token (thus sending a new email) each time it - # got a 401 with a 'flows' field. - # (https://github.com/vector-im/vector-web/issues/2447). - # - # Grandfather in the old behaviour for now to avoid - # breaking old riot deployments. - raise - # this step failed. Merge the error dict into the response # so that the client can have another go. errordict = e.error_dict()