Fix error when processing remote actors with null public keys (#40194)
This commit is contained in:
1 parent
45b1c2e48d
commit
e8ae44f4d7
1 file changed
+3
-1
@@ -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