Skip to content

Commit

Permalink
Added protection against proxy setups treating requests as local even…
Browse files Browse the repository at this point in the history
… when they're not #3898 [stephen_purcell@yahoo.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 16, 2006
1 parent 3a7be80 commit f735934
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Added protection against proxy setups treating requests as local even when they're not #3898 [stephen_purcell@yahoo.com]

* Added TestRequest#raw_post that simulate raw_post from CgiRequest #3042 [francois.beausoleil@gmail.com]

* Underscore dasherized keys in formatted requests [Jamis Buck]
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/rescue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def rescue_action_in_public(exception) #:doc:
# the remote IP being 127.0.0.1. For example, this could include the IP of the developer machine when debugging
# remotely.
def local_request? #:doc:
@request.remote_addr == "127.0.0.1"
[@request.remote_addr, @request.remote_ip] == ["127.0.0.1"] * 2
end

# Renders a detailed diagnostics screen on action exceptions.
Expand Down

0 comments on commit f735934

Please sign in to comment.