Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a800603

Browse files
Prevent email UIA failures from raising a LoginError (#9265)
Context, Fixes: #9263 In the past to fix an issue with old Riots re-requesting threepid validation tokens, we raised a `LoginError` during UIA instead of `InteractiveAuthIncompleteError`. This is now breaking the way Tchap logs in - which isn't standard, but also isn't disallowed by the spec. An easy fix is just to remove the 4 year old workaround.
1 parent 13c7ab8 commit a800603

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

changelog.d/9265.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prevent password hashes from getting dropped if a client failed threepid validation during a User Interactive Auth stage. Removes a workaround for an ancient bug in Riot Web <v0.7.4.

synapse/handlers/auth.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -567,16 +567,6 @@ async def check_ui_auth(
567567
session.session_id, login_type, result
568568
)
569569
except LoginError as e:
570-
if login_type == LoginType.EMAIL_IDENTITY:
571-
# riot used to have a bug where it would request a new
572-
# validation token (thus sending a new email) each time it
573-
# got a 401 with a 'flows' field.
574-
# (https://github.com/vector-im/vector-web/issues/2447).
575-
#
576-
# Grandfather in the old behaviour for now to avoid
577-
# breaking old riot deployments.
578-
raise
579-
580570
# this step failed. Merge the error dict into the response
581571
# so that the client can have another go.
582572
errordict = e.error_dict()

0 commit comments

Comments
 (0)