Skip to content

fix: refuse non-ASCII delegation digests (upstream #588 companion) - #2

Draft
dinakarjs wants to merge 1 commit into
review/delegation-588-basefrom
fix/delegation-nonascii-review
Draft

dinakarjs wants to merge 1 commit into
review/delegation-588-basefrom
fix/delegation-nonascii-review

Conversation

@dinakarjs

Copy link
Copy Markdown
Owner

Author-adoption companion to agentrust-io#588 at 547a4ef. Implements lywinged's requested ASCII guard before str compare_digest, preserving DelegationError and existing valid SHA256/SHA384 links. No change to the draft chain walk or its rule independence.

Python 3.12.14, existing development environment: 160 delegation module/vector/completeness tests pass; targeted Ruff, mypy and whitespace checks pass. Four new cases (non-ASCII and lone surrogate, SHA256 and SHA384) fail with TypeError on the unmodified parent and pass with the guard. A near-miss encoding both operands as UTF-8 passes the non-ASCII cases but fails both surrogate cases. Final source restored and tests rerun.

This is a one-commit companion for the original author to cherry-pick, not independent approval or an upstream replacement. Nonblocking trusted-key typing, draft-profile wording and changelog feedback remain for the author's disposition. No new cold-reader review is claimed; hosted checks and maintainer re-review remain required. Prepared with Codex.

Signed-off-by: Srinivasa Dinakar Jainti dinakarjs@gmail.com

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant