RealIp does not account for clients on intranet
Mantenedores costumam responder em até 2 dias
@sl0thentr0py já está trabalhando nisso.
Desde 9/4/2025.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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
- Linguagem predominante
- Ruby
- Estrelas
- 990
- Forks
- 552
- Merge médio
- 2d 16h
- PRs com merge (30d)
- 29
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-ruby
-
Bug Ruby
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
getsentry/sentry-ruby#3211 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Events dropped client-side for size are only logged at debug level and not recorded as lostTalvez já em andamento @sentry-junior assumiu hoje. AbertaBug Junior: repro Ruby
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
getsentry/sentry-ruby#3209 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 2 dias
-
with_child_span drops spans when blocks exit via break, return, or throwTalvez já em andamento @itsrayeedscodespace assumiu há 1 dia. AbertaBug Ruby Traces Waiting for: Product Owner
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 38/100
getsentry/sentry-ruby#3206 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Let apps choose how the client IP on events is determinedTalvez já em andamento @sl0thentr0py assumiu há 11 dias. AbertaImprovement Ruby
getsentry/sentry-ruby#3180 · 2 comentários · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
breaking change Next Major
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 58/100
getsentry/sentry-ruby#3176 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de getsentry/sentry-ruby
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
internetee/registry#2984 ·
Mantenedores costumam responder em até 6 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
ecosyste-ms/issues#862 ·
Mantenedores costumam responder em até 1 dia
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredTalvez já em andamento @mimosa assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
riscv/riscv-unified-db#2829 ·
Mantenedores costumam responder em até 1 dia
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
rubyforgood/casa#7404 ·
Mantenedores costumam responder em até 1 dia