From 341698ed40e023898d9f9d1f5c163d4d2cab4832 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 16 Jul 2014 12:21:46 -0300 Subject: Don't accept parameters as argument for redirect to [via @homakov] Closes #16170 --- actionpack/lib/action_controller/metal/redirecting.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index 3feb737277..ca8c0278d0 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -68,6 +68,7 @@ module ActionController # ActionController::RedirectBackError. def redirect_to(options = {}, response_status = {}) #:doc: raise ActionControllerError.new("Cannot redirect to nil!") unless options + raise ActionControllerError.new("Cannot redirect to a parameter hash!") if options.is_a?(ActionController::Parameters) raise AbstractController::DoubleRenderError if response_body self.status = _extract_redirect_to_status(options, response_status) -- cgit v1.2.3