diff options
author | Andre Arko <andre@arko.net> | 2011-11-13 10:20:29 -1000 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2011-11-13 10:20:29 -1000 |
commit | 2189bff732490aa842c88f1691993520fa1eb9ab (patch) | |
tree | 593308299b71d8349ae34eff3db3ffefa4652902 /actionpack/lib/action_dispatch/middleware | |
parent | 8f0085a483ebc6d416e902c3caff68f82934e091 (diff) | |
download | rails-2189bff732490aa842c88f1691993520fa1eb9ab.tar.gz rails-2189bff732490aa842c88f1691993520fa1eb9ab.tar.bz2 rails-2189bff732490aa842c88f1691993520fa1eb9ab.zip |
correctly raise IpSpoofAttackError message
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/remote_ip.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb index 3b813b03bb..3208256d56 100644 --- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb +++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb @@ -51,8 +51,8 @@ module ActionDispatch if check_ip && !forwarded_ips.include?(client_ip) # We don't know which came from the proxy, and which from the user raise IpSpoofAttackError, "IP spoofing attack?!" \ - "HTTP_CLIENT_IP=#{env['HTTP_CLIENT_IP'].inspect}" \ - "HTTP_X_FORWARDED_FOR=#{env['HTTP_X_FORWARDED_FOR'].inspect}" + "HTTP_CLIENT_IP=#{@env['HTTP_CLIENT_IP'].inspect}" \ + "HTTP_X_FORWARDED_FOR=#{@env['HTTP_X_FORWARDED_FOR'].inspect}" end client_ip || forwarded_ips.last || remote_addrs.last |