diff options
| author | grunfink <grunfink@comam.es> | 2025-07-08 17:20:51 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-07-08 17:20:51 +0200 |
| commit | 1417ffd9dc6aab00898d1ce346742ec4250e657a (patch) | |
| tree | 70afcf3d1486f781e7fce79ec4366f052db251af | |
| parent | ed3428d9533a6076553d57d5a119cb9212641d46 (diff) | |
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.
| -rw-r--r-- | webfinger.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |