From ade4518ae47b94daded408fc921b439e209d9da4 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 17 Feb 2016 22:36:33 +0100 Subject: [PATCH] Make the Link header give URI for WebFinger lookup --- plugins/WebFinger/WebFingerPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/WebFinger/WebFingerPlugin.php b/plugins/WebFinger/WebFingerPlugin.php index ce8c847aa7..1677501a20 100644 --- a/plugins/WebFinger/WebFingerPlugin.php +++ b/plugins/WebFinger/WebFingerPlugin.php @@ -144,8 +144,8 @@ class WebFingerPlugin extends Plugin public function onStartShowHTML($action) { if ($action instanceof ShowstreamAction) { - $acct = 'acct:'. $action->getTarget()->getNickname() .'@'. common_config('site', 'server'); - $url = common_local_url('webfinger') . '?resource='.$acct; + $resource = $action->getTarget()->getUri(); + $url = common_local_url('webfinger') . '?resource='.urlencode($resource); foreach (array(Discovery::JRD_MIMETYPE, Discovery::XRD_MIMETYPE) as $type) { header('Link: <'.$url.'>; rel="'. Discovery::LRDD_REL.'"; type="'.$type.'"', false); -- 2.39.5