diff options
| author | 2025-07-08 17:20:51 +0200 | |
|---|---|---|
| committer | 2025-07-08 17:20:51 +0200 | |
| commit | 1417ffd9dc6aab00898d1ce346742ec4250e657a (patch) | |
| tree | 70afcf3d1486f781e7fce79ec4366f052db251af | |
| parent | Version 2.80 RELEASED. (diff) | |
| download | penes-snac2-1417ffd9dc6aab00898d1ce346742ec4250e657a.tar.gz penes-snac2-1417ffd9dc6aab00898d1ce346742ec4250e657a.tar.xz penes-snac2-1417ffd9dc6aab00898d1ce346742ec4250e657a.zip | |
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 | |||
| 93 | if (user != NULL) { | 93 | if (user != NULL) { |
| 94 | const char *subject = xs_dict_get(obj, "subject"); | 94 | const char *subject = xs_dict_get(obj, "subject"); |
| 95 | 95 | ||
| 96 | if (subject) | 96 | if (subject && xs_startswith(subject, "acct:")) |
| 97 | *user = xs_replace_n(subject, "acct:", "", 1); | 97 | *user = xs_replace_n(subject, "acct:", "", 1); |
| 98 | } | 98 | } |
| 99 | 99 | ||