From 2135bdfd3aa62cb319fb73f87c071b36a160ef73 Mon Sep 17 00:00:00 2001 From: grunfink Date: Wed, 24 Jun 2026 10:58:59 +0200 Subject: Added an additional check for updated actor objects. --- activitypub.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index cfa97a0..7d9eb7b 100644 --- a/activitypub.c +++ b/activitypub.c @@ -3067,10 +3067,16 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) else if (strcmp(type, "Update") == 0) { /** **/ if (xs_match(utype, "Person|Service|Application")) { /** **/ - actor_add(actor, xs_dict_get(msg, "object")); - timeline_touch(snac); + if (strcmp(actor, key_id) == 0) { + actor_add(actor, xs_dict_get(msg, "object")); + timeline_touch(snac); - snac_log(snac, xs_fmt("updated actor %s", actor)); + snac_log(snac, xs_fmt("updated actor %s", actor)); + } + else { + srv_log(xs_fmt("Update: mismatched actor '%s' and key '%s'", actor, key_id)); + srv_archive_error("update_actor_key_mismatch", "bad keyId", actor, key_id); + } } else if (xs_match(utype, "Note|Page|Article|Video|Audio|Event")) { /** **/ -- cgit