1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added protection against proxy setups treating requests as local even 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
This commit is contained in:
David Heinemeier Hansson 2006-03-16 03:31:40 +00:00
parent 3a7be80f47
commit f7359342af
2 changed files with 3 additions and 1 deletions

View file

@ -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]

View file

@ -60,7 +60,7 @@ module ActionController #:nodoc:
# 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.