From 52aba709ffbe2f5410334beca6c114739054ab4c Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Thu, 18 May 2017 09:36:15 -0700 Subject: [PATCH] Fix #32506 The host should not be modified, nor is it needed for the redirect. --- app/controllers/concerns/routable_actions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/routable_actions.rb b/app/controllers/concerns/routable_actions.rb index afd110adcad..76c2908463c 100644 --- a/app/controllers/concerns/routable_actions.rb +++ b/app/controllers/concerns/routable_actions.rb @@ -32,7 +32,7 @@ module RoutableActions if canonical_path.casecmp(requested_path) != 0 flash[:notice] = "#{routable.class.to_s.titleize} '#{requested_path}' was moved to '#{canonical_path}'. Please update any links and bookmarks that may still have the old path." end - redirect_to request.original_url.sub(requested_path, canonical_path) + redirect_to request.original_fullpath.sub(requested_path, canonical_path) end end end