From 664b0ca8cb10383c4c64964f830c41ddef4acb27 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 17 Jul 2023 22:51:30 +0900 Subject: [PATCH] Check if json body is null on Activitipub::ProcessingWorker (#26021) --- app/services/activitypub/process_collection_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb index 52f48bd49..4f049a5ae 100644 --- a/app/services/activitypub/process_collection_service.rb +++ b/app/services/activitypub/process_collection_service.rb @@ -8,6 +8,8 @@ class ActivityPub::ProcessCollectionService < BaseService @json = original_json = Oj.load(body, mode: :strict) @options = options + return unless @json.is_a?(Hash) + begin @json = compact(@json) if @json['signature'].is_a?(Hash) rescue JSON::LD::JsonLdError => e