Skip to content

fix: bound Candid decoding and correct certificate absence - #12

Merged
humandebri merged 1 commit into
mainfrom
fix/candid-decoding-certificates
Sep 8, 2026
Merged

humandebri merged 1 commit into
mainfrom
fix/candid-decoding-certificates

Conversation

@humandebri

Copy link
Copy Markdown
Owner

Purpose

小さなCandid応答による過大な型展開、Dataスライスのクラッシュ、LEB128の相互運用性、証明書の不存在判定を修正し、0.7.6として公開します。

Changes

  • 型解決・正規化・値検証で共有する100万単位の処理量予算を追加。キャッシュ経由でも深さ制限を適用します。
  • Dataの開始添字を考慮し、非最短LEB128表現を既存の数値・長さ制限内で受理します。
  • ソート済みハッシュ木のラベル境界から不存在を判定し、prunedの兄弟枝がある場合もポーリングの継続とerror_codeなしの認証済みrejectを扱います。
  • 回帰テストとREADME・CHANGELOGを更新します。

Verification

  • Swift全体テスト、Swift 6厳格並行性ビルド: 成功
  • Rustテスト、Swift 6設定の生成プラグインfixture: 成功
  • iOS Simulator向けxcodebuild: 成功
  • LEB128の7ケースをcandid 0.10.35と比較: 復号・再エンコード結果が一致
  • マージ前にGitHub CIのSimulatorテストを含む全チェックを確認します。

Impact

公開APIとエンコード結果は維持します。処理量予算を超える入力は、新たにICClientError.invalidCandidとして拒否します。同梱bindgenは0.1.3のままです。

Share a fixed work budget across Candid decoding, preserve Data slice indices, accept padded LEB128, and use sorted hash-tree boundaries for certified absence. Add regression coverage and prepare the 0.7.6 release notes.
@humandebri
humandebri merged commit fed6a7b into main Sep 8, 2026
7 checks passed
@humandebri
humandebri deleted the fix/candid-decoding-certificates branch September 12, 2026 06:45
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