Skip to content

Commit

Permalink
Fix leaking private statuses the admin account follows (mastodon#11300)
Browse files Browse the repository at this point in the history
Now that the request is signed, it can return private toots. Do not leak them.
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent 65c58be commit aa61165
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/services/resolve_url_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def process_url
if equals_or_includes_any?(type, ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES)
FetchRemoteAccountService.new.call(resource_url, body, protocol)
elsif equals_or_includes_any?(type, ActivityPub::Activity::Create::SUPPORTED_TYPES + ActivityPub::Activity::Create::CONVERTED_TYPES)
FetchRemoteStatusService.new.call(resource_url, body, protocol)
status = FetchRemoteStatusService.new.call(resource_url, body, protocol)
authorize_with @on_behalf_of, status, :show? unless status.nil?
status
end
end

Expand Down

0 comments on commit aa61165

Please sign in to comment.