Fix ActivityPub node count check (#41482)

This commit is contained in:
Claire committed 2026-11-03 15:51:10 +01:00
1 parent cc444438a2
commit 1a21185fb4
1 file changed
+7 -1
@@ -12,7 +12,13 @@ class ActivityPub::ProcessCollectionService < BaseService
return unless @json.is_a?(Hash)
begin
@json = compact(@json) if @json['signature'].is_a?(Hash)
if @json['signature'].is_a?(Hash)
check_jsonld_limits!(@json)
@json = compact(@json)
end
# Unsupported features can be aliased, so re-check after compaction
check_jsonld_limits!(@json)
rescue Mastodon::InvalidJsonLdError => e
Rails.logger.debug { "JSON-LD handling for document from #{value_or_id(@json['actor'])} skipped: #{e.message}" }