Repository navigation
fix(sdk): expectDid pins the RFC 9421 signer; strict sig1 parsing; owner JSON depth limit - #195
Merged
Merged
Conversation
…ner JSON depth limit Day 6 review gate (C1, H1, H2, M1 and the SDK lows): - verifyRequest / verify_request and verifyResponse / verify_response take expectDid / expect_did (one DID or a list): any other keyid, a did:key included, fails with the new code unexpected_signer before any key is read or fetched. allowDidWeb alone is not a pin, and the docs say so. Vectors: expect_did in test-vectors/http-signature.json. - Signature-Input and Signature must hold exactly one sig1 member, and a repeated parameter fails with missing_headers. Vectors: duplicate-param, two-sig1-inputs, two-sig1-signatures. Invalid http vectors now carry their own names instead of their base case's. - Owner key logs, approvals and payload summaries refuse JSON nested deeper than 64 containers, in all four SDKs. Vectors: keylog-1 depth-limit and too-deep, approval clientDataJSON depth and NaN cases, a 64-deep payload and a 65-deep refused one. - Python: parse_json refuses NaN and Infinity, and input too deep for the parser, with InvalidInputError; _der_to_raw refuses a truncated sequence. Hostile input is a verifier failure, never another exception. - Swift: the owner walker used lazy.compactMap.first, which runs its closure twice per level on the way to an error: 2^depth calls, a hang on a deep input. Plain loops now.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… checks refuse it either way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Day 6 review gate, SDK part (oneentity
docs/mobile/review/GATE-REPORT.mdC1, H1, H2, M1 and the SDK lows). Ships in 1.1.0: nothing is staged yet, so the versions stay andCHANGELOG.mdgains the entries.What
verifyRequest/verify_requestandverifyResponse/verify_responsetakeexpectDid/expect_did(one DID or a list). Any other keyid, adid:keyincluded, fails with the new codeunexpected_signerbefore any key is read or fetched. A did:web DID in the pin needs noallowDidWeb. The docs sayallowDidWebalone is not a pin: three products read it as one and accepted anydid:keyas the account service.Signature-InputandSignaturemust each hold exactly onesig1member, and a repeated parameter fails withmissing_headers(TS and Python).parse_jsonrefuses NaN and Infinity, and input too deep for the parser, withInvalidInputError;_der_to_rawrefuses a truncated sequence. Hostile input is a verifier failure (a 422), never another exception (a 500).lazy.compactMap { }.firstran its closure twice per level on the way to an error: 2^depth calls, so a deep input hung the verifier. Plain loops now.expect_didinhttp-signature.json,duplicate-paramand two-sig1cases,keylog-1/depth-limit.jsonandtoo-deep.json, approval NaN and depth cases, a 64-deep payload and a refused 65-deep one. The invalid http vectors now carry their own names instead of their base case's.Decisions
expectDid: they have no RFC 9421 verifier, which is a server-side profile that no app receives.did:keyunder a did:web pin answersunexpected_signer, and nothing is fetched for a signer outside the pin.Test plan
verify.shgreen through the shared heavy-job gate (TS, Python, Kotlin 125, Swift 38).