fix(programs): enforce extension checks for Compress with CToken-only outputs (H-01)#2261
fix(programs): enforce extension checks for Compress with CToken-only outputs (H-01)#2261ananas-block wants to merge 1 commit intomainfrom
Conversation
…n-only outputs (H-01) Previously, all compression modes bypassed check_mint_extensions() when no_compressed_outputs was true. This allowed Compress-mode operations with CToken-only outputs to skip restricted extension enforcement. Now only CompressAndClose and Decompress-with-no-outputs bypass the check.
📝 WalkthroughWalkthroughThe PR refines bypass logic for mint extension checks in the compressed token transfer code. The condition was narrowed to restrict bypasses: instead of bypassing for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing in favor of #2246 which addresses the H-01 vulnerability at the correct enforcement point (decompress path), without breaking the legitimate Compress-with-no-outputs case. |
Summary
no_compressed_outputstriggeredcheck_mint_extensions()instead ofparse_mint_extensions().Changes
check_extensions.rs: Changed condition fromis_compress_and_close() || no_compressed_outputstois_compress_and_close() || (is_decompress() && no_compressed_outputs).Summary by CodeRabbit