Repository navigation
fix(security): take the client address from the socket in payment-method correction - #1628
Conversation
…hod correction Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
PR Summary by QodoUse socket-derived addresses for payment correction PIN limits
AI Description
Merge Risk
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent |
Summary
x-forwarded-forheader whenreq.ipwas empty, and that value keys the approval-PIN rate limit. It now usesreq.ip || req.socket.remoteAddress, matching the other payment routes. Practical exposure was low:trust proxyis not set, soreq.ipnormally wins.main/mentionsx-forwarded-fororx-real-ip. The check failed before the fix and passes after it.Verification
npm run lint,npm run build,test:secure-network-lan-integrity,test:refund-completed-orders,test:integration-payments,test:financial-safety-remediationexit 0;git diff --checkclean.npm testwas not run locally.🤖 Generated with Claude Code