Don't process ActivityPub payload if signature is invalid (#4752)
* Don't process ActivityPub payload if signature is invalid * Fix style issue
This commit is contained in:
parent
6b2be5dbfb
commit
f7937d903c
2 changed files with 48 additions and 4 deletions
|
@ -9,7 +9,7 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||
|
||||
return if @account.suspended? || !supported_context?
|
||||
|
||||
verify_account! if different_actor?
|
||||
return if different_actor? && verify_account!.nil?
|
||||
|
||||
case @json['type']
|
||||
when 'Collection', 'CollectionPage'
|
||||
|
@ -43,7 +43,6 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||
end
|
||||
|
||||
def verify_account!
|
||||
account = ActivityPub::LinkedDataSignature.new(@json).verify_account!
|
||||
@account = account unless account.nil?
|
||||
@account = ActivityPub::LinkedDataSignature.new(@json).verify_account!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue