fix(selfhost): stop client-spoofed cf-connecting-ip from bypassing rate limits - #6550
fix(selfhost): stop client-spoofed cf-connecting-ip from bypassing rate limits#6550RealDiligent wants to merge 7 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
d586533 to
b460278
Compare
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6550 +/- ##
==========================================
+ Coverage 93.59% 95.82% +2.22%
==========================================
Files 673 591 -82
Lines 67687 47170 -20517
Branches 18618 15020 -3598
==========================================
- Hits 63354 45200 -18154
+ Misses 3360 1176 -2184
+ Partials 973 794 -179
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-16 13:47:21 UTC
Review summary Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…p patch Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
LoopOver is closing this pull request on the maintainer's behalf (No linked issue detected). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
RATE_LIMITER, butclientIp()trustscf-connecting-ip. On Node that header is attacker-controlled (Caddy only sets X-Real-IP / X-Forwarded-For).serve({ fetch })edge, overwritecf-connecting-ipviawithTrustedClientIp+peerRemoteAddress(documented@hono/node-serverHttpBindings | Http2Bindingsshape, unit-tested). Behind a private peer prefer X-Real-IP / XFF; on a public peer use the TCP address.Supersedes closed #6547 (CI + linked-issue requirements). Maintainer: contributors cannot open issues on this repo (
CreateIssuedenied); please open/label agittensor:bugtracking issue so this PR canCloses #N.Test plan
fetchtyped asHttpBindings | Http2BindingsRisk / tradeoffs