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

Fix duplicate accounts being created when fetching an account for its key only #13147

Merged

Conversation

ClearlyClaire
Copy link
Contributor

Fixes #13136

When a user's canonical acct domain is different from its id's domain
(WEB_DOMAIN ≠ LOCAL_DOMAIN), two webfinger queries are required to find the
canonical domain from the URI. However, we skip webfinger queries when
updating only the key of a remote user, which led to the creation of a
duplicate account, using the URI's domain instead of the canonical acct: one.

Fixes mastodon#13136

When a user's canonical acct domain is different from its id's domain
(WEB_DOMAIN ≠ LOCAL_DOMAIN), two webfinger queries are required to find the
canonical domain from the URI. However, we skip webfinger queries when
updating only the key of a remote user, which led to the creation of a
duplicate account, using the URI's domain instead of the canonical acct: one.
@Gargron Gargron changed the title Fix duplicate account creation when fetching an account for its key only Fix duplicate accounts being created when fetching an account for its key only Feb 24, 2020
@Gargron Gargron merged commit 3704402 into mastodon:master Feb 24, 2020
@thegcat
Copy link

thegcat commented Feb 24, 2020

@Gargron @ThibG Thank you for the fix! Any pointers on how to deal with existing duplicate/erroneous entries in the DB? Should the remote admin just delete the users with the "wrong" domain?

@thegcat
Copy link

thegcat commented Feb 24, 2020

Sorry, meant to ask this in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 Account saved with web domain instead of local domain in remote instance
3 participants