fix: use timingSafeEqual for Instagram verify_token - #759
Conversation
Fixes corsairdev#692 Replace direct string comparison with timingSafeEqual to prevent timing attacks on Instagram webhook verification.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughInstagram webhook verification now uses length-checked ChangesInstagram token verification
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized security hardening changes Instagram webhook token comparison without any supplied merge-blocking risk; it is merge-ready after normal checks and review. Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
Greptile SummaryThis PR replaces direct Instagram webhook verification-token comparison with a byte-length check and
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "fix(instagram): indent timingSafeEqual c..." | Re-trigger Greptile |
|
@joycefoster642 The timingSafeEqual change is right, but the new lines mix tabs and spaces (and there’s a trailing space on const a). That’ll fail format. Re-indent to match the rest of the file and this is good to go. |
|
@greptile review |
|
Just noting that this appears to be fixed by commit a4ce5df. Happy to close this PR. Thanks to @Dhirenderchoudhary for the merge! |
ambikeesshh
left a comment
There was a problem hiding this comment.
compare looks right. please add the tests from the inline note, then this should be good.
|
LGTM |
Description
Fixes #692
Replace direct string comparison with timingSafeEqual to prevent timing attacks on Instagram webhook verification.
Checklist
Before submitting your PR, please verify the following:
pnpm lintand all checks passpnpm typecheckand there are no TypeScript errorspnpm buildand all packages build successfullypnpm testand all tests passScreenshots / Demos (if applicable)
Additional Notes
Summary by CodeRabbit
Security