From bb89f0af8a54abe4ae790f11b6f7c03a00158cfc Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 6 Feb 2023 21:00:58 +0100 Subject: [PATCH] Fix ActivityPub::ProcessingWorker error on incoming malformed JSON-LD (#23416) --- app/services/activitypub/process_collection_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb index fffe30195..8218b8a12 100644 --- a/app/services/activitypub/process_collection_service.rb +++ b/app/services/activitypub/process_collection_service.rb @@ -71,7 +71,7 @@ class ActivityPub::ProcessCollectionService < BaseService @account = ActivityPub::LinkedDataSignature.new(@json).verify_actor! @account = nil unless @account.is_a?(Account) @account - rescue JSON::LD::JsonLdError => e + rescue JSON::LD::JsonLdError, RDF::WriterError => e Rails.logger.debug "Could not verify LD-Signature for #{value_or_id(@json['actor'])}: #{e.message}" nil end