Revert "Webfinger: Allow managing account for subdomain"

This reverts commit 84bb854056.
This commit is contained in:
marcin mikołajczak 2024-05-22 15:52:10 +02:00 committed by Lain Soykaf
parent 7b4e6d4c16
commit 50ffbd980e
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ def finger(account) do
defp validate_webfinger(url, %{"subject" => "acct:" <> acct} = data) do
with %URI{host: request_host} <- URI.parse(url),
[_name, acct_host] <- String.split(acct, "@"),
{_, true} <- {:hosts_match_or_subdomain, String.ends_with?(request_host, acct_host)} do
{_, true} <- {:hosts_match, acct_host == request_host} do
{:ok, data}
else
_ -> {:error, {:webfinger_invalid, url, data}}