Handle scenario when webfinger response subject
is missing host value (#28088)
This commit is contained in:
parent
b9492d84a0
commit
6b46bf9953
2 changed files with 16 additions and 1 deletions
|
@ -100,7 +100,9 @@ class ResolveAccountService < BaseService
|
|||
end
|
||||
|
||||
def split_acct(acct)
|
||||
acct.delete_prefix('acct:').split('@')
|
||||
acct.delete_prefix('acct:').split('@').tap do |parts|
|
||||
raise Webfinger::Error, 'Webfinger response is missing user or host value' unless parts.size == 2
|
||||
end
|
||||
end
|
||||
|
||||
def fetch_account!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue