]> cat aescling's git repositories - mastodon.git/commit
Fix webfinger redirect handling in ResolveAccountService (#15187)
authorThibG <thib@sitedethib.com>
Thu, 19 Nov 2020 18:52:06 +0000 (19:52 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 18:52:06 +0000 (19:52 +0100)
commit8b8004a9626442ae31e4dffd79e874e9cde050c6
tree8fb0c4743e8d902505d19e1b54b494dada54775b
parent96c1e7132971877fba308c51cd42306f0b1bf166
Fix webfinger redirect handling in ResolveAccountService (#15187)

* Fix webfinger redirect handling in ResolveAccountService

ResolveAccountService#process_webfinger! handled a one-step webfinger
redirection, but only accepting the result if it matched the exact URI passed
as input, defeating the point of a redirection check.

Instead, use the same logic as in `ActivityPub::FetchRemoteAccountService`,
updating the resulting `acct:` URI with the result of the first webfinger
query.

* Add tests
app/services/resolve_account_service.rb
spec/services/resolve_account_service_spec.rb