1
0
Fork 1
forked from fedi/mastodon

Fix ActivityPub::ProcessingWorker error on incoming malformed JSON-LD (#23416)

This commit is contained in:
Claire 2023-02-06 21:00:58 +01:00 committed by talon
parent c9af165771
commit ac60c9f29a

View file

@ -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