RealIp does not account for clients on intranet
Maintainer thường phản hồi trong vòng 2 ngày
@sl0thentr0py đang làm issue này rồi.
Từ ngày 9/4/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Issue Description
sentry-ruby/lib/sentry/utils/real_ip.rb - Sentry::Utils::RealIp.initialize prepends a list of standard local and private IP blocks (LOCAL_ADDRESSES) to the supplied trusted_proxies.
The combined list is later used to determine the client's real IP by eliminating trusted proxies.
When hosting on a cloud provider and accessing from a client behind a firewall, this is fine - "user" will be the client's firewall LAN IP.
However, if hosting on the same LAN as the client, the client's IP will be filtered out. It's possible all candidate IPs will be filtered out in some situations.
Reproduction Steps
Set up a Rails app server, a reverse proxy, and a client all on the same LAN using one of the standard private CIDR blocks.
Configure the Rails app with sentry-rails and set and set config.action_dispatch.trusted_proxies to include only the IP of the reverse proxy.
Expected Behavior
The same behavior as Rails 7.1: If config.action_dispatch.trusted_proxies is set, the default list is replaced.
This allows the app to be more selective in which IPs it discards when choosing what IP to report as the client's.
(Note: config.action_dispatch.trusted_proxies now only accepts enumerable and always replaces the hard coded default.)
Actual Behavior
Sentry::Utils::RealIp.initialize will be called with the list of trusted_proxies from the ActionDispatch configuration, but these will be supplemented by the static LOCAL_ADDRESSES.
Since all LAN IPs will be matched by that list, Sentry will not see the client's real IP.
Ruby Version
3.1.6
SDK Version
5.19
Integration and Its Version
Rails
Sentry Config
The only relevant setting: send_default_pii = true
- Ngôn ngữ chính
- Ruby
- Star
- 990
- Fork
- 552
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-ruby
-
Bug Ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-ruby#3211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Events dropped client-side for size are only logged at debug level and not recorded as lostCó thể đã có người làm @sentry-junior đã nhận hôm nay. Đang mởBug Junior: repro Ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-ruby#3209 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
with_child_span drops spans when blocks exit via break, return, or throwCó thể đã có người làm @itsrayeedscodespace đã nhận 1 ngày trước. Đang mởBug Ruby Traces Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
getsentry/sentry-ruby#3206 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Let apps choose how the client IP on events is determinedCó thể đã có người làm @sl0thentr0py đã nhận 11 ngày trước. Đang mởImprovement Ruby
getsentry/sentry-ruby#3180 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Remove `sentry-ruby-core` gemĐang mởbreaking change Next Major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
getsentry/sentry-ruby#3176 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của getsentry/sentry-ruby
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
internetee/registry#2984 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ecosyste-ms/issues#862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredCó thể đã có người làm @mimosa đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
riscv/riscv-unified-db#2829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubyforgood/casa#7404 ·
Maintainer thường phản hồi trong vòng 1 ngày