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

Get handle from atom feed's author/email field instead of guessing fr… #1344

Merged
merged 1 commit into from Apr 9, 2017

Commits on Apr 9, 2017

  1. Get handle from atom feed's author/email field instead of guessing fr…

    …om URL
    
    The goal of this change is to enhance Mastodon's handling of remote domains
    for which the APIs reside on a different host (see issue mastodon#1032).
    
    Indeed, when a remote user unknown to Mastodon is mentionned, only its profile
    URL (e.g. https://social.example.org/users/User) is known, and Mastodon has to
    build a @username@domain handle for it. To do so, Mastodon fetches the user's
    atom feed (e.g., https://social.example.org/users/User.atom) and uses its
    content to get the username part of the handle, and the URL's host part to
    build the domain (e.g., @user@social.example.org). This handle is then used
    for a Webfinger request.
    
    In the case where example.org serves the Webfinger info for @user@example.org
    and all feeds and APIs are hosted at social.example.org, Mastodon will still
    build @user@social.example.org and fail at resolving the account's details
    through Webfinger.
    
    This patch changes this behaviour by using the author's email address from
    the atom feed to build the handle. In Mastodon-generated atom feeds, the
    email address is always the handle it expects for federation.
    ClearlyClaire committed Apr 9, 2017
    Configuration menu
    Copy the full SHA
    89b132d View commit details
    Browse the repository at this point in the history