RealIp does not account for clients on intranet
メンテナーはふだん 2 日以内に返信
@sl0thentr0py がすでに取り組んでいます。
2025年4月9日 から。
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- Ruby
- スター
- 990
- フォーク
- 552
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 29
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-ruby のほかの issue
-
Bug Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3211 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Events dropped client-side for size are only logged at debug level and not recorded as lost対応中かも @sentry-junior が今日担当しました。 オープンBug Junior: repro Ruby
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-ruby#3209 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
with_child_span drops spans when blocks exit via break, return, or throw対応中かも @itsrayeedscodespace が 1 日前に担当しました。 オープンBug Ruby Traces Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
getsentry/sentry-ruby#3206 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Let apps choose how the client IP on events is determined対応中かも @sl0thentr0py が 11 日前に担当しました。 オープンImprovement Ruby
getsentry/sentry-ruby#3180 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
breaking change Next Major
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
getsentry/sentry-ruby#3176 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
getsentry/sentry-ruby の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
internetee/registry#2984 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ecosyste-ms/issues#862 ·
メンテナーはふだん 1 日以内に返信
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configured対応中かも @mimosa が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
riscv/riscv-unified-db#2829 ·
メンテナーはふだん 1 日以内に返信
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubyforgood/casa#7404 ·
メンテナーはふだん 1 日以内に返信