diff options
author | Jose and Yehuda <wycats@gmail.com> | 2012-04-24 22:32:09 -0500 |
---|---|---|
committer | Jose and Yehuda <wycats@gmail.com> | 2012-04-24 22:52:26 -0500 |
commit | 56cdc81c08b1847c5c1f699810a8c3b9ac3715a6 (patch) | |
tree | a896641a85a55eab01eb74a129dbcbb09f7f8b6b /actionpack/test/dispatch/session/cache_store_test.rb | |
parent | 0cc32c5fd7f875de61262b430bca23825691899b (diff) | |
download | rails-56cdc81c08b1847c5c1f699810a8c3b9ac3715a6.tar.gz rails-56cdc81c08b1847c5c1f699810a8c3b9ac3715a6.tar.bz2 rails-56cdc81c08b1847c5c1f699810a8c3b9ac3715a6.zip |
Remove default match without specified method
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.
In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.
This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.
Closes #5964
Diffstat (limited to 'actionpack/test/dispatch/session/cache_store_test.rb')
-rw-r--r-- | actionpack/test/dispatch/session/cache_store_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/session/cache_store_test.rb b/actionpack/test/dispatch/session/cache_store_test.rb index 12405bf45d..a74e165826 100644 --- a/actionpack/test/dispatch/session/cache_store_test.rb +++ b/actionpack/test/dispatch/session/cache_store_test.rb @@ -164,7 +164,7 @@ class CacheStoreTest < ActionDispatch::IntegrationTest def with_test_route_set with_routing do |set| set.draw do - match ':action', :to => ::CacheStoreTest::TestController + get ':action', :to => ::CacheStoreTest::TestController end @app = self.class.build_app(set) do |middleware| |