webfinger: allow resolution of usernames with dots in them (internal actors)

This commit is contained in:
Ariadne Conill 2019-07-17 16:59:29 +00:00
parent a9d6a12bb3
commit 0a6f6e1b5b
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ defmodule Pleroma.Web.WebFinger do
def webfinger(resource, fmt) when fmt in ["XML", "JSON"] do
host = Pleroma.Web.Endpoint.host()
regex = ~r/(acct:)?(?<username>\w+)@#{host}/
regex = ~r/(acct:)?(?<username>[a-z0-9A-Z_\.-]+)@#{host}/
with %{"username" => username} <- Regex.named_captures(regex, resource),
%User{} = user <- User.get_cached_by_nickname(username) do