Skip to content

Rails 3.2 fixes#1557

Merged
josevalim merged 9 commits into
masterfrom
rails-3-2-fixes
Jan 10, 2012
Merged

Rails 3.2 fixes#1557
josevalim merged 9 commits into
masterfrom
rails-3-2-fixes

Conversation

@rafaelfranca

Copy link
Copy Markdown
Collaborator

No description provided.

@rodrigoflores

Copy link
Copy Markdown
Contributor

Looks like Rack 1.4.0 does a IP spoofing protection, so we have to add this line for the test to pass:

     sign_in_as_user do
+      header "HTTP_CLIENT_IP", arbitrary_ip
       header 'HTTP_X_FORWARDED_FOR', arbitrary_ip
     end

This protection didn't exists on Rake 1.3.5.

@josevalim, @carlosantoniodasilva any thoughts? I don't know a better solution than forcing the HTTP_CLIENT_IP

@rafaelfranca

Copy link
Copy Markdown
Collaborator Author

If we use a not local network IP in the HTTP_X_FORWARDED_FOR the test pass too

@rafaelfranca

Copy link
Copy Markdown
Collaborator Author

@josevalim how I fix this test? Setting the HTTP_CLIENT_IP or using a no local network ip?

@josevalim

Copy link
Copy Markdown
Contributor

Both ways are fine.

@rafaelfranca

Copy link
Copy Markdown
Collaborator Author

I think that is fine to merge now

josevalim added a commit that referenced this pull request Jan 10, 2012
@josevalim josevalim merged commit a43d1af into master Jan 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants