Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Nov 6, 2019

Conversation

@anoadragon453
Copy link
Member

anoadragon453 commented Nov 6, 2019

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 added this to In progress in Homeserver Task Board via automation Nov 6, 2019
@anoadragon453 anoadragon453 requested a review from matrix-org/synapse-core Nov 6, 2019
Copy link
Member

erikjohnston left a comment

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.

synapse/handlers/register.py Show resolved Hide resolved
synapse/handlers/register.py Outdated Show resolved Hide resolved
synapse/replication/http/register.py Outdated Show resolved Hide resolved
@anoadragon453 anoadragon453 merged commit a6ebef1 into develop Nov 6, 2019
20 checks passed
20 checks passed
buildkite/synapse Build #5442 passed (22 minutes, 24 seconds)
Details
buildkite/synapse/check-sample-config Passed (1 minute, 39 seconds)
Details
buildkite/synapse/check-style Passed (2 minutes, 14 seconds)
Details
buildkite/synapse/isort Passed (19 seconds)
Details
buildkite/synapse/mypy Passed (26 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (44 seconds)
Details
buildkite/synapse/packaging Passed (21 seconds)
Details
buildkite/synapse/pipeline Passed (10 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (18 minutes, 10 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (7 minutes, 49 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (9 minutes, 32 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (7 minutes, 19 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (18 minutes, 18 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (17 minutes, 43 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (7 minutes, 28 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-5-slash-postgres-9-dot-5 Passed (1 minute, 49 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-7-slash-postgres-11 Passed (1 minute, 47 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (15 minutes, 27 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (15 minutes, 5 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (14 minutes, 4 seconds)
Details
Homeserver Task Board automation moved this from In progress to Done Nov 6, 2019
@anoadragon453 anoadragon453 deleted the anoa/guest_registration_faff branch Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.