aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-06-24 14:46:28 +0200
committergrunfink <grunfink@comam.es>2026-06-24 14:46:28 +0200
commit778046fa7ab73e64b6a30021f1c81fc72c58bea7 (patch)
tree85a9267b2f2b310624ed321be7265911a197217c
parentf54956128afe4c0fae57375e1a6a42ecdcd10d55 (diff)
On mismatched 'Update' messages, request the objects instead of just failing.
-rw-r--r--activitypub.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c
index c3fd7fd..e9be2de 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -3075,9 +3075,11 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
snac_log(snac, xs_fmt("updated actor %s", actor));
}
else {
- xs_str *e = xs_fmt("Update: mismatched actor '%s' and key '%s'", actor, key_id);
- srv_archive_error("update_actor_key_mismatch", e, req, msg);
- snac_log(snac, e);
+ /* actor / key mismatch: don't accept blindly, but request an actor update
+ from the original source, as the Update may come from a relay and be legit */
+ enqueue_actor_refresh(snac, actor, 0);
+
+ snac_log(snac, xs_fmt("Update: mismatched actor '%s' and key '%s'", actor, key_id));
}
}
else
@@ -3094,9 +3096,10 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
snac_log(snac, xs_fmt("ignored post 'Update' with no attributedTo %s", id));
else
if (strcmp(atto, key_id) != 0) {
- xs_str *e = xs_fmt("Update: mismatched attributedTo '%s' and key '%s'", atto, key_id);
- srv_archive_error("update_post_key_mismatch", e, req, msg);
- snac_log(snac, e);
+ /* actor / key mismatch: request the object from the original source */
+ enqueue_object_request(snac, id, 0);
+
+ snac_log(snac, xs_fmt("Update: mismatched attributedTo '%s' and key '%s'", atto, key_id));
}
else
if (xs_startswith(id, srv_baseurl) && !xs_startswith(id, actor))