diff options
| author | grunfink <grunfink@comam.es> | 2026-06-24 10:58:59 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-06-24 10:58:59 +0200 |
| commit | 2135bdfd3aa62cb319fb73f87c071b36a160ef73 (patch) | |
| tree | 7ee77a51b5403c401be7e3722938ac8c81ac0290 | |
| parent | fe83b48f5b1bb5f30c65e1ba3fc10d0f1cfb1841 (diff) | |
Added an additional check for updated actor objects.
| -rw-r--r-- | activitypub.c | 12 |
1 files changed, 9 insertions, 3 deletions
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")) { /** **/ |