From 4c740a3927fd9f964251fe0425fdaf0deb645b07 Mon Sep 17 00:00:00 2001 From: Mark Imbriaco Date: Tue, 3 Jun 2008 15:19:57 -0400 Subject: [PATCH] If Client-IP and X-Forwarded-For are the same, we don't need to return a 500. --- actionpack/lib/action_controller/request.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index a35b904..c1b133e 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -141,7 +141,7 @@ module ActionController end if @env.include? 'HTTP_CLIENT_IP' - if @env.include? 'HTTP_X_FORWARDED_FOR' + if @env.include? 'HTTP_X_FORWARDED_FOR' && @env['HTTP_CLIENT_IP'] != @env['HTTP_X_FORWARDED_FOR'] # We don't know which came from the proxy, and which from the user raise ActionControllerError.new(<