From: Ariadne Conill Date: Wed, 17 Jul 2019 16:59:29 +0000 (+0000) Subject: webfinger: allow resolution of usernames with dots in them (internal actors) X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=0a6f6e1b5bf863fc23a90e6ef358129364bcacce;p=akkoma webfinger: allow resolution of usernames with dots in them (internal actors) --- diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index 3fca72de8..fa34c7ced 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -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:)?(?\w+)@#{host}/ + regex = ~r/(acct:)?(?[a-z0-9A-Z_\.-]+)@#{host}/ with %{"username" => username} <- Regex.named_captures(regex, resource), %User{} = user <- User.get_cached_by_nickname(username) do