diff options
author | lain <lain@soykaf.club> | 2020-05-03 13:48:01 +0200 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-10 02:09:36 +0300 |
commit | f7c28ae54484e1c5df48c89560e7822d04c7e5eb (patch) | |
tree | f32473c53ce1c3baf4adbe1657cf5ed6a002c437 /lib | |
parent | dd7bf4aeced3163532b4d39bf69e32fa3bfd4143 (diff) | |
download | pleroma-f7c28ae54484e1c5df48c89560e7822d04c7e5eb.tar.gz pleroma-f7c28ae54484e1c5df48c89560e7822d04c7e5eb.zip |
Webfinger: Request account info with the acct scheme
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/web_finger/web_finger.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index 43a81c75d..8f71820d7 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -193,13 +193,15 @@ defmodule Pleroma.Web.WebFinger do URI.parse(account).host end + encoded_account = URI.encode("acct:#{account}") + address = case find_lrdd_template(domain) do {:ok, template} -> - String.replace(template, "{uri}", URI.encode(account)) + String.replace(template, "{uri}", encoded_account) _ -> - "https://#{domain}/.well-known/webfinger?resource=acct:#{account}" + "https://#{domain}/.well-known/webfinger?resource=#{encoded_account}" end with response <- |