Skip to content
This repository
Browse code

correctly raise IpSpoofAttackError message

  • Loading branch information...
commit 2189bff732490aa842c88f1691993520fa1eb9ab 1 parent 8f0085a
André Arko indirect authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 actionpack/lib/action_dispatch/middleware/remote_ip.rb
4 actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -51,8 +51,8 @@ def to_s
51 51 if check_ip && !forwarded_ips.include?(client_ip)
52 52 # We don't know which came from the proxy, and which from the user
53 53 raise IpSpoofAttackError, "IP spoofing attack?!" \
54   - "HTTP_CLIENT_IP=#{env['HTTP_CLIENT_IP'].inspect}" \
55   - "HTTP_X_FORWARDED_FOR=#{env['HTTP_X_FORWARDED_FOR'].inspect}"
  54 + "HTTP_CLIENT_IP=#{@env['HTTP_CLIENT_IP'].inspect}" \
  55 + "HTTP_X_FORWARDED_FOR=#{@env['HTTP_X_FORWARDED_FOR'].inspect}"
56 56 end
57 57
58 58 client_ip || forwarded_ips.last || remote_addrs.last

0 comments on commit 2189bff

Please sign in to comment.
Something went wrong with that request. Please try again.