Files
heartwood/crates
Daniel Norman eee5cb8d8c radicle: Reject COB changes with forged identity
Each COB change names an identity commit in its `Rad-Resource`
trailer. Patches and issues check the rights of the author against the
document in that commit. Nothing checked that the commit is a revision
of the repository identity. Any user could write a commit with a
document that names them as a delegate, cite it, and act as a delegate.

- Add `Identity::is_accepted`, which follows each revision's parent
  back from `rad/id`, so a change that cites the head costs one blob
  read
- Add `ReadRepository::identity_revision_doc`, which returns the
  document of an accepted identity revision only
- Use it in `Op::identity_doc`, so a change with any other resource
  gets no identity document and is rejected
- Document that `identity_doc_at` does not check the commit
- Test forged resources on patches and issues, and the accepted chain

Accepted revisions form a chain, because a revision is only adopted if
its parent is the current revision. Callers synchronize `rad/id` with
the current revision after identity writes, so the chain holds every
accepted revision.
2026-11-02 21:27:45 +01:00
..
2026-10-23 20:17:44 +02:00