-
Notifications
You must be signed in to change notification settings - Fork 59
Ignore guest devices and empty IPs when migrating from Synapse #4121
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
Conversation
Deploying matrix-authentication-service-docs with
|
| Latest commit: |
b6bb596
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://798348a4.matrix-authentication-service-docs.pages.dev |
| Branch Preview URL: | https://quenting-syn2mas-ignore-thin.matrix-authentication-service-docs.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy otherwise
| }; | ||
|
|
||
| let Some((localpart, server_name)) = without_sigil.split_once(':') else { | ||
| let Some((localpart, server_name)) = without_sigil.rsplit_once(':') else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is different from Synapse's splitting logic (see below refs) and moreover would break on @user:localhost:4242...
- https://github.com/element-hq/synapse/blob/154e23f6d76277cc8012dc7a5dfa5f22d62b9133/synapse/server.py#L394
- https://github.com/element-hq/synapse/blob/154e23f6d76277cc8012dc7a5dfa5f22d62b9133/synapse/types/__init__.py#L305
If we have truly broken user IDs in the m.org DB then .... maybe it'd be best to find a way to exorcise the database of those :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I reverted this for now; the problematic user on matrix.org is an AS one, and has no 3pid or device, so I'll do a proper fix to ignore this user once the PR to read AS users lands
This reverts commit 7263bca.
Can be reviewed commit by commit
First commit is to handle localparts that have colons in them (for some reason), e.g.@foo:bar:matrix.orgSecond commit is to not warn when importing '-' as IP address, because Synapse will use this value sometimes
Thirds is to ignore devices with the
guest_devicesas device ID, as we don't care about importing those