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

Register race condition: User ID in use #5450

Open
dbkr opened this issue Jun 13, 2019 · 0 comments
Open

Register race condition: User ID in use #5450

dbkr opened this issue Jun 13, 2019 · 0 comments
Labels
A-Registration Creating an account O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@dbkr
Copy link
Member

dbkr commented Jun 13, 2019

The registration endpoint uses set_session_data (https://github.com/matrix-org/synapse/blob/master/synapse/rest/client/v2_alpha/register.py#L486) and get_session_data (https://github.com/matrix-org/synapse/blob/master/synapse/rest/client/v2_alpha/register.py#L326) on the auth_handler to remember that it has registered a user for the UI auth session and return the same user on subsequent calls for idempotency.

Unfortunately there is enough code between these calls that when synapse is having a slow day, another rquest can come in and get past the get_session_data before the first has hit set_session_data, in which case one (some) of the requests return the User ID in use error rather than returning the same session.

@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-bug (Deprecated Label) labels Jun 20, 2019
@reivilibre reivilibre added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Registration Creating an account O-Uncommon Most users are unlikely to come across this or unexpected workflow labels May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Registration Creating an account O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants