1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/dispatch
Matthew Draper d160a8d637 When all IPs are trusted, use the furthest away
Scenario: we have a REMOTE_ADDR of `127.0.0.1`, and X-Forwarded-For is
`A, B, C`.

Without any relevant trust, the `remote_ip` is `C`.

If `C` is trusted, then the `remote_ip` is `B`.

If `B` and `C` are trusted, then the `remote_ip` is `A`.

If all of `A`, `B`, and `C` are trusted, then the `remote_ip` should
still be `A`: if our trust was sufficient to get that far out before,
trusting something else should not have us fall back to `127.0.0.1`.

It is this last situation that we're correcting here:

We trust `A` to give us accurate X-Forwarded-For information, yet it has
chosen to leave it unset. Therefore, `A` is telling us that it is itself
the client.
2020-01-03 09:03:23 -05:00
..
request Use match? where we don't need MatchData 2019-07-29 14:23:10 +09:00
routing Allow tests to run without a TTY 2019-08-14 10:52:21 -07:00
session Fix cop violations 2019-12-18 17:07:44 -03:00
system_testing Fix test with new capybara 2019-12-27 15:30:45 -03:00
actionable_exceptions_test.rb Refactor after the most recent code review 2019-04-19 14:15:41 +09:00
callbacks_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
content_disposition_test.rb Encode Content-Disposition filenames on send_data and send_file 2018-09-13 21:38:46 +09:00
content_security_policy_test.rb Add support for script-src-attr / elem and style-src-attr / elem directives 2019-07-18 10:00:54 +09:00
cookies_test.rb Add SameSite protection to every written cookie 2019-12-15 01:37:24 +01:00
debug_exceptions_test.rb Encode template source before extracting lines 2019-12-21 07:30:52 +00:00
debug_locks_test.rb Fix can't modify frozen String error in DebugLocks 2017-08-28 21:48:05 +09:00
exception_wrapper_test.rb Address all possible Performance/StartWith / Performance/EndWith violations 2019-11-14 03:20:29 +09:00
executor_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
feature_policy_test.rb Adds support for configuring HTTP Feature Policy (#33439) 2019-07-10 15:33:15 -07:00
header_test.rb Remove Rubocop's comments from Rails code base 2018-07-26 23:37:31 +03:00
host_authorization_test.rb Cleanup the whitelisting references after #33145 2019-02-03 10:58:10 +02:00
live_response_test.rb Allow custom cache-control header in AC::Live 2019-02-25 21:25:13 +03:00
mapper_test.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
middleware_stack_test.rb Only build middleware proxy when instrumentating 2019-05-08 13:30:41 -07:00
mime_type_test.rb Mime::Mimes#symbols should return a always up to date reference: 2020-01-02 18:05:33 +01:00
mount_test.rb mounted routes with non-word characters 2019-04-15 15:11:13 +02:00
prefix_generation_test.rb Use a single term instead of all terms used to describe path and URL helpers together 2019-07-26 23:54:39 +05:30
rack_cache_test.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
reloader_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
request_id_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
request_test.rb When all IPs are trusted, use the furthest away 2020-01-03 09:03:23 -05:00
response_test.rb Fix content_type= to not discard extra part 2019-08-23 05:22:53 +09:00
routing_assertions_test.rb Make sure assert_recognizes can still find routes mounted after engines 2018-02-09 13:51:20 -05:00
routing_test.rb Merge pull request #37075 from woahdae/fix-multiple-choice-route-options 2019-12-12 12:34:30 -08:00
runner_test.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
show_exceptions_test.rb Add the Mime::Type::InvalidMimeType error in the default rescue_response: 2019-03-26 02:03:47 +01:00
ssl_test.rb Fix keyword arguments warnings 2019-09-09 22:49:09 +09:00
static_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
test_request_test.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
test_response_test.rb Remove deprecated methods in ActionDispatch::TestResponse 2019-01-17 16:08:31 -05:00
uploaded_file_test.rb Restore UploadedFile compatibility with IO.copy_stream 2019-02-23 23:36:58 +01:00
url_generation_test.rb Revert "Merge pull request #33970 from rails/eager-url-helpers" 2018-10-03 16:15:47 -05:00