Updated donation checkout metadata handling#28352
Conversation
no issue - hardened handling of donation checkout metadata
WalkthroughThis PR adds layered defenses against reserved gift-related metadata being injected into donation checkout sessions. The router controller strips reserved keys from incoming requests, the webhook event handler normalizes metadata flags and rejects conflicting donation/gift markers, and the donation service ensures its own metadata flag cannot be overridden by caller input. Tests validate the filtering behavior end-to-end and confirm webhook routing correctly handles metadata normalization and conflicts. Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
no ref
Tightens how donation checkout metadata is assembled so Ghost-owned metadata stays authoritative and webhook routing keys off trusted values.