From 9471fa0078fe144ad359d1da4e63146f11a5caf5 Mon Sep 17 00:00:00 2001 From: a Date: Fri, 23 Dec 2022 08:21:03 -0600 Subject: [PATCH] more semantically correct webfinger (use rel=self, allow type=ld+json) --- app/Services/WebfingerService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/WebfingerService.php b/app/Services/WebfingerService.php index 80791466..78a0008b 100644 --- a/app/Services/WebfingerService.php +++ b/app/Services/WebfingerService.php @@ -48,9 +48,11 @@ class WebfingerService $link = collect($webfinger['links']) ->filter(function($link) { return $link && + isset($link['rel']) && isset($link['type']) && isset($link['href']) && - $link['type'] == 'application/activity+json'; + $link['rel'] == 'self' && + $link['type'] == 'application/activity+json' || $link['type'] == 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'; }) ->pluck('href') ->first();