Handle scenario when webfinger response subject is missing host value (#28088)

This commit is contained in:
Matt Jankowski 2023-11-28 13:37:54 -05:00 committed by GitHub
parent b9492d84a0
commit 6b46bf9953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -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!