From 3a762cddf6311db95c4bd1b674a7bbaccb446152 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Mon, 13 Jan 2025 14:35:16 +0100 Subject: [PATCH] Reject announce payload if object is nil (#33570) --- app/lib/activitypub/activity/announce.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/activitypub/activity/announce.rb b/app/lib/activitypub/activity/announce.rb index 9dcafff3abc..b57dca9ad75 100644 --- a/app/lib/activitypub/activity/announce.rb +++ b/app/lib/activitypub/activity/announce.rb @@ -3,6 +3,7 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity def perform return reject_payload! if delete_arrived_first?(@json['id']) || !related_to_local_activity? + return reject_payload! if @object.nil? with_redis_lock("announce:#{value_or_id(@object)}") do original_status = status_from_object