Răsfoiți Sursa

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.
grunfink 1 an în urmă
părinte
comite
1417ffd9dc
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      webfinger.c

+ 1 - 1
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);
         }