mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-12 12:25:55 -05:00
Fix error when processing remote actors with null public keys (#40194)
This commit is contained in:
@@ -406,6 +406,8 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
next unless value['owner'] == @account.uri
|
||||
|
||||
key = value['publicKeyPem']
|
||||
next if key.nil?
|
||||
|
||||
{ type: :rsa, public_key: key, uri: key_id }
|
||||
end
|
||||
end
|
||||
@@ -433,7 +435,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
||||
next unless value['type'] == 'Multikey' && value['controller'] == @account.uri
|
||||
|
||||
key_type, key = key_from_multikey(value['publicKeyMultibase'])
|
||||
next if key_type.nil?
|
||||
next if key_type.nil? || key.nil?
|
||||
|
||||
{ type: key_type, public_key: key, uri: key_id }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user