about summary refs log tree commit diff
path: root/app/services/activitypub
diff options
context:
space:
mode:
authorPuck Meerburg <puck@puck.moe>2022-01-22 13:48:27 +0000
committerClaire <claire.github-309c@sitedethib.com>2022-02-02 16:13:11 +0100
commit63da32468cf5f5145deb51c93019009a6ef7f8db (patch)
treedc92c782651a9b05996e730b63a2a68a0735762f /app/services/activitypub
parent20a4b8081f419195334faee1b066e7e609ad4ffe (diff)
Compact JSON-LD signed incoming activities
Diffstat (limited to 'app/services/activitypub')
-rw-r--r--app/services/activitypub/process_collection_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb
index 170e6709c..5f3d63bb3 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    = Oj.load(body, mode: :strict)
     @options = options
 
+    @json = compact(@json) if @json['signature'].is_a?(Hash)
+
     return if !supported_context? || (different_actor? && verify_account!.nil?) || suspended_actor? || @account.local?
 
     case @json['type']