From 1417ffd9dc6aab00898d1ce346742ec4250e657a Mon Sep 17 00:00:00 2001 From: grunfink Date: Tue, 8 Jul 2025 17:20:51 +0200 Subject: Minor webfinger tweak. Some implementations (at least, Activitypub for Wordpress) return valid webfinger queries also for posts; this confused poor simple snac. This change only accepts as valid actor requests those queries that have a 'subject' field that start with 'acct:'. If this has a side effect, remains to be seen. --- webfinger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webfinger.c') diff --git a/webfinger.c b/webfinger.c index 5db9a97..dc0855a 100644 --- a/webfinger.c +++ b/webfinger.c @@ -93,7 +93,7 @@ int webfinger_request_signed(snac *snac, const char *qs, xs_str **actor, xs_str if (user != NULL) { const char *subject = xs_dict_get(obj, "subject"); - if (subject) + if (subject && xs_startswith(subject, "acct:")) *user = xs_replace_n(subject, "acct:", "", 1); } -- cgit v1.2.3