mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Webfinger: Allow managing account for subdomain
This commit is contained in:
parent
91c93ce3cd
commit
84bb854056
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ defmodule Pleroma.Web.WebFinger do
|
||||||
defp validate_webfinger(url, %{"subject" => "acct:" <> acct} = data) do
|
defp validate_webfinger(url, %{"subject" => "acct:" <> acct} = data) do
|
||||||
with %URI{host: request_host} <- URI.parse(url),
|
with %URI{host: request_host} <- URI.parse(url),
|
||||||
[_name, acct_host] <- String.split(acct, "@"),
|
[_name, acct_host] <- String.split(acct, "@"),
|
||||||
{_, true} <- {:hosts_match, acct_host == request_host} do
|
{_, true} <- {:hosts_match_or_subdomain, String.ends_with?(request_host, acct_host)} do
|
||||||
{:ok, data}
|
{:ok, data}
|
||||||
else
|
else
|
||||||
_ -> {:error, {:webfinger_invalid, url, data}}
|
_ -> {:error, {:webfinger_invalid, url, data}}
|
||||||
|
|
Loading…
Reference in a new issue