Repository navigation
Only accept follows for the named recipient - #3972
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Proposed changes:
Follow::handle_follow()added the follower to the actor whose inbox received the Follow, without looking at itsobject. It now resolves the object and only accepts the Follow when it names one of the recipients, and adds the follower to that actor. This is the same recipient checkQuote_Requestuses. With several recipients, the named one gets the follower instead of the first.Actors::get_id_by_resource()resolvedhttps://<any host>/@nameto a local user, because the http(s) branch never looked at the host. It now only resolves this site's host or the host it moved from, like theacct:branch already did.activitypub_old_host) was written out in theacct:branch and inApplication. It is now one function,is_local_host(), used in both branches and inApplication. Each branch keeps its error code (activitypub_no_user_foundfor http(s),activitypub_wrong_hostforacct:).Other information:
Callers that resolved a foreign
/@nameto a local actor no longer do: inbox recipient resolution, the blog actor check inAnnounce, WebFinger andApplication. Old URLs keep resolving after a domain move.Testing instructions:
vendor/bin/phpunit --filter 'Test_Follow|Test_Actors|test_is_local_host'https://other.example/@adminthroughActors::get_id_by_resource(), it should return an error.Changelog entry
Changelog Entry Details
Significance
Type
Message