mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
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.