fix: verify mint and owner in idempotent ATA early return#2255
fix: verify mint and owner in idempotent ATA early return#2255ananas-block wants to merge 3 commits intomainfrom
Conversation
Audit issue #4 (LOW): The idempotent ATA path returned Ok() when the account was already owned by the program without verifying the stored mint and owner matched the requested values. Add Token deserialization and field checks before the early return.
📝 WalkthroughWalkthroughThis change adds runtime verification to the idempotent ATA creation path by validating that stored mint and owner match requested values. If either field mismatches, a specific error is emitted; if both match, execution continues as before. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 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 |
Summary
Summary by CodeRabbit
Bug Fixes