Skip to content
Browse files

correctly raise IpSpoofAttackError message

  • Loading branch information...
1 parent 8f0085a commit 2189bff732490aa842c88f1691993520fa1eb9ab @indirect indirect committed Nov 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/middleware/remote_ip.rb
View
4 actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -51,8 +51,8 @@ def to_s
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

0 comments on commit 2189bff

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