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

Prevent email UIA failures from raising a LoginError #9265

Merged
merged 3 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/9265.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent password hashes from getting dropped if a client failed threepid validation during a User Interactive Auth stage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to mention that this removes a workaround for Element < some number?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or at least "for old Riots"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, indeed yes. The fix was added in Riot v0.7.4. I'll add that to the changelog.

10 changes: 0 additions & 10 deletions synapse/handlers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,16 +567,6 @@ async def check_ui_auth(
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()
Expand Down