#963

Reject ambiguous Cashu encodings and invalid proof amounts

DraftChessing234wants to merge intofrom

Cashu decoding currently replaces malformed UTF-8, sums duplicate CBOR fields, accepts excess base64 padding, and lets a valid proof hide invalid proof amounts in strict /pay decoding. This can display an ambiguous amount or allow a malformed token through the send gate.

Reject ambiguous encodings before extracting a summary and reject invalid proof amounts in strict mode. Permissive display still ignores invalid amounts or renders unsupported V4 data as a generic chip.

Validation: all 13 Cashu decoder tests pass; the same suite has four failures against current main. Added regressions for JSON/CBOR UTF-8, duplicate fields, padding, and mixed valid/invalid amounts. Full unit/lint checks and physical send validation are still pending, so this is a draft. No raw device evidence is included.

Checked open and closed Cashu changes, including the original feature PRs #773/#776 and parity work #935. These parser cases are still present on main and are not fixed in that work.

Activity

2
chatgpt-codex-connector[bot]16d ago

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-10-14T11:22:30.770896Ze5d9ccfDraft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This pull request is a draft

Merging is unavailable until it is marked ready for review.