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

Make numeric user_id checker start at @0, and don't ratelimit on checking#6338

Merged
anoadragon453 merged 5 commits intodevelopfrom
anoa/guest_registration_faff
Nov 6, 2019
Merged

Make numeric user_id checker start at @0, and don't ratelimit on checking#6338
anoadragon453 merged 5 commits intodevelopfrom
anoa/guest_registration_faff

Conversation

@anoadragon453
Copy link
Copy Markdown
Member

Fixes #5225

This PR:

  • Changes find_next_generated_user_id_localpart to start at @0 instead of @1, so we don't tell people it's ok to register @0 and then they proceed to try every number up the entire table
  • I've removed the rate limiting check from register_with_store and moved it up and out, also eliminating the need to have an explicit check for application service registration.

@anoadragon453 anoadragon453 self-assigned this Nov 6, 2019
@anoadragon453 anoadragon453 requested a review from a team November 6, 2019 13:46
Copy link
Copy Markdown
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

Just some niggles. Can you also put a limit on the autogenerate user ID loop please? That way if we do hit the bug again we will only loop a few times before giving up, rather than taking out the servuce.

Comment thread synapse/handlers/register.py
Comment thread synapse/handlers/register.py Outdated
Comment thread synapse/replication/http/register.py Outdated
Comment thread synapse/handlers/register.py Outdated
@anoadragon453 anoadragon453 merged commit a6ebef1 into develop Nov 6, 2019
@anoadragon453 anoadragon453 deleted the anoa/guest_registration_faff branch November 6, 2019 17:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants