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

Add rspec to further specify FollowRemoteAccountService #2414

Merged

Conversation

ClearlyClaire
Copy link
Contributor

This pull request is a follow-up to #2147 to further specify the intended behavior of FollowRemoteAccountService and make sure it prevents hijacking remote accounts using webfinger, while still following legitimate redirections.

To give a bit more background, webfinger queries for an “acct:” URI are not required to return a response with the same “acct:” URI as subject. This allows some form of redirection (user a@example.com is now called b@example.com, or has moved to a@example.org).

However, until #2147 was merged, Mastodon would take the returned subject “acct:” URI as the actual ID of the remote account, even if it didn't match the requested “acct:” URI, making it possible for attackers to create or overwrite a remote account for a domain they do not control.

Copy link
Contributor

@ashfurrow ashfurrow left a comment

Choose a reason for hiding this comment

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

Wow, nice work! I don't fully understand the protocols you're working with but your description of the problem this PR fixes is 💯

@ashfurrow ashfurrow requested a review from Gargron April 29, 2017 09:26
@Gargron Gargron merged commit bea97ea into mastodon:master May 2, 2017
@ClearlyClaire ClearlyClaire deleted the rspec-remote-account-hijacking branch June 6, 2017 04:56
ClearlyClaire added a commit to ClearlyClaire/mastodon that referenced this pull request Sep 19, 2023
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.

None yet

3 participants