aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-19 15:32:16 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-19 15:36:05 -0300
commitd59a24d543b4fd34d453e8209caae5fef315ea78 (patch)
tree109b429dd60534634379583f3cf8d391c9f95fb5 /activesupport
parent4d1d81d33804449b19f34643b4ed396a5da02edc (diff)
downloadrails-d59a24d543b4fd34d453e8209caae5fef315ea78.tar.gz
rails-d59a24d543b4fd34d453e8209caae5fef315ea78.tar.bz2
rails-d59a24d543b4fd34d453e8209caae5fef315ea78.zip
Protect against error when parsing parameters with Bad Request
Related with #11795.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb b/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb
index 901c2e05a8..c55600a02d 100644
--- a/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb
+++ b/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb
@@ -28,6 +28,9 @@ module ActiveSupport
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
end
response
+ rescue Rack::Utils::InvalidParameterError
+ LocalCacheRegistry.set_cache_for(local_cache_key, nil)
+ [400, {}, []]
rescue Exception
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
raise