1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
This commit is contained in:
Claire 2024-07-31 14:09:14 +00:00 committed by GitHub
commit a6d3ba9c88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,7 @@
class ActivityPub::ProcessCollectionService < BaseService class ActivityPub::ProcessCollectionService < BaseService
include JsonLdHelper include JsonLdHelper
include DomainControlHelper
def call(body, actor, **options) def call(body, actor, **options)
@account = actor @account = actor
@ -69,6 +70,9 @@ class ActivityPub::ProcessCollectionService < BaseService
end end
def verify_account! def verify_account!
return unless @json['signature'].is_a?(Hash)
return if domain_not_allowed?(@json['signature']['creator'])
@options[:relayed_through_actor] = @account @options[:relayed_through_actor] = @account
@account = ActivityPub::LinkedDataSignature.new(@json).verify_actor! @account = ActivityPub::LinkedDataSignature.new(@json).verify_actor!
@account = nil unless @account.is_a?(Account) @account = nil unless @account.is_a?(Account)