# Failsafe error in rails 2.1 RC1 - ip spoofing

**URL:** <https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155>\
**Category:** Rails\
**Created:** [May 31, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155 "2008-05-31T17:29:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [May 31, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/1 "2008-05-31T17:29:07Z")

</div>

Hi All,  
I am getting the following errors in my app using RC 1 of Rails 2.1.  
These  
errors only appear to be happening for search engine bots/crawlers, but  
since my site needs to be indexed, I would like to get rid of them. Does  
anyone know if there is a fix, or perhaps a config option not to check  
for  
ip spoofing?

/!\ FAILSAFE /!\ Sat May 31 11:12:54 -0400 2008  
Status: 500 Internal Server Error  
IP spoofing attack?!  
HTTP\_CLIENT\_IP=“67.195.44.101”  
HTTP\_X\_FORWARDED\_FOR=“67.195.44.101, 67.195.37.172”

Thanks,  
Sean

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [June 4, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/2 "2008-06-04T22:00:04Z")

</div>

did you try this patch?

[http://rails.lighthouseapp.com/attachments/25763/forwarded\_client\_ip\_with\_test.patch](http://rails.lighthouseapp.com/attachments/25763/forwarded_client_ip_with_test.patch)

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [June 9, 2008, 5:09am UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/3 "2008-06-09T05:09:49Z")

</div>

Thanks for the link to the patch, but why would one have to patch rails  
in  
order to avoid these failsafe errors. They are being caused exclusively  
buy  
yahoo’s crawlers/bots, but isn’t everyone else’s site being crawled by  
them  
as well? Is everyone else’s site getting these errors as well?  
Thanks,  
Sean

On Wed, Jun 4, 2008 at 4:00 PM, Evgeniy Kelyarsky \<

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [July 15, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/4 "2008-07-15T22:52:50Z")

</div>

i’m seeing this a lot with the release version of rails 2.1

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [July 20, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/5 "2008-07-20T20:33:57Z")

</div>

Please, can you specify how to aply the patch, I do:

## MacBook:rails$ patch -p0 \< forwarded\_client\_ip\_with\_test.patch can’t find file to patch at input line 15 Perhaps you used the wrong -p or --strip option? The text leading up to this was:

|From 75c2fbc4faa8ea15f136fb414627afa19e47d09e Mon Sep 17 00:00:00 2001  
|From: Bradford F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
|Date: Tue, 3 Jun 2008 17:11:48 -0500  
|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 | 7 +++±–  
| actionpack/test/controller/request\_test.rb | 3 +++  
| 2 files changed, 7 insertions(+), 3 deletions(-)  
|  
|diff --git a/actionpack/lib/action\_controller/request.rb b/actionpack/lib/action\_controller/request.rb  
|index a35b904…f275ec1 100755  
|— a/actionpack/lib/action\_controller/request.rb

| +++ b/actionpack/lib/action\_controller/request.rb |
| --- |
| File to patch: |

Can you help me?

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [August 13, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/6 "2008-08-13T22:20:03Z")

</div>

Is anyone else seeing these errors? I’ve just hit upon it while  
setting up a cluster. Rails 2.1.

---

<div class="post-metadata">

**Author:** ![Sean\_OSHara](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Post date:** [September 3, 2008, 1:12am UTC](https://www.ruby-forum.com/t/failsafe-error-in-rails-2-1-rc1-ip-spoofing/139155/7 "2008-09-03T01:12:33Z")

</div>

Sean H. wrote:

> Is anyone else seeing these errors? I’ve just hit upon it while  
> setting up a cluster. Rails 2.1.

Try this :

> **[iprog.com | Rails 500 error - IP spoofing attack](https://iprog.com/posting/2008/08/rails_500_error_ip_spoofing_attack)**
>
> Apparently Rails 2.1 has the nifty ability to throw a 500 Internal Server Error with the message “IP spoofing attack?!” under certain circumstances. Unfortunately, those circumstances include a common Apache/Mongrel deployment and Yahoo’s crawler,...

SYL
