commit 1417ffd
grunfink
·
2025-07-08 15:20:51 +0000 UTC
parent ed3428d
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.
1 files changed,
+1,
-1
+1,
-1
1@@ -93,7 +93,7 @@ int webfinger_request_signed(snac *snac, const char *qs, xs_str **actor, xs_str
2 if (user != NULL) {
3 const char *subject = xs_dict_get(obj, "subject");
4
5- if (subject)
6+ if (subject && xs_startswith(subject, "acct:"))
7 *user = xs_replace_n(subject, "acct:", "", 1);
8 }
9