From: Thibaut Girka Date: Mon, 11 Mar 2019 10:25:38 +0000 (+0100) Subject: Do not leak instance-local polls to remote followers X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7d026aa07927a8960a573350a1aa2a538ef938f3;p=mastodon.git Do not leak instance-local polls to remote followers --- diff --git a/app/workers/activitypub/distribute_poll_update_worker.rb b/app/workers/activitypub/distribute_poll_update_worker.rb index 718279c1b..02da583cd 100644 --- a/app/workers/activitypub/distribute_poll_update_worker.rb +++ b/app/workers/activitypub/distribute_poll_update_worker.rb @@ -9,7 +9,7 @@ class ActivityPub::DistributePollUpdateWorker @status = Status.find(status_id) @account = @status.account - return unless @status.poll + return if @status.poll.nil? || @status.local_only? ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url| [payload, @account.id, inbox_url]