aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/web_finger
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-03 13:48:01 +0200
committerlain <lain@soykaf.club>2020-05-03 13:48:01 +0200
commita7966f2080a0e9b3c2b35efa7ea647c1bdef2a2d (patch)
tree09d5e1e071c6a3fcccf185f983910310fd981798 /lib/pleroma/web/web_finger
parent095635453ac58b9e01a32ad226c0b61466c16da0 (diff)
downloadpleroma-a7966f2080a0e9b3c2b35efa7ea647c1bdef2a2d.tar.gz
Webfinger: Request account info with the acct scheme
Diffstat (limited to 'lib/pleroma/web/web_finger')
-rw-r--r--lib/pleroma/web/web_finger/web_finger.ex6
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 7ffd0e51b..442b25165 100644
--- a/lib/pleroma/web/web_finger/web_finger.ex
+++ b/lib/pleroma/web/web_finger/web_finger.ex
@@ -194,13 +194,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 <-