fix: tolerate quotes and host bits in HP_TRUSTED_PROXY_IPS and keep valid entries - #112
fix: tolerate quotes and host bits in HP_TRUSTED_PROXY_IPS and keep valid entries#112oleksandr-nc wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTrusted proxy parsing now tokenizes comma-separated environment values, strips surrounding quotes and whitespace, normalizes network entries with host bits, and logs ignored invalid entries. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
haproxy_agent.py (1)
78-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression tests for the trusted-proxy parser.
This security-sensitive path should cover quoted comma-separated values, host-bit normalization, mixed valid/invalid entries, and the no-valid-entry fallback that disables forwarded-header trust.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 66481226-e3a5-44b0-9292-a9c91ef104f7
📒 Files selected for processing (2)
README.mdhaproxy_agent.py
…alid entries Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
44eeb38 to
cd65ab7
Compare
Values for
HP_TRUSTED_PROXY_IPSoften arrive with literal quotes (env files, compose list syntax, systemd units) and are then rejected, which silently disables client IP detection and lets bruteforce protection ban the reverse proxy for everyone behind it. Quotes are now stripped, ranges with host bits set are masked to their network the same way Nextcloud handlestrusted_proxies, and invalid entries are skipped individually instead of discarding the whole list. Fixes #108.