summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/todos_controller.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-04-05 22:52:19 +0000
committerDJ Mountney <david@twkie.net>2017-04-05 21:06:58 -0700
commitb80653bb6aa8518e0a61e85cae4430928078c092 (patch)
tree46d3de9e716c4491fb0e23d6b6790b41f441de2c /app/controllers/dashboard/todos_controller.rb
parent0d8fba4eece4fa527dd764472c0e05e1f05f8bc4 (diff)
downloadgitlab-ce-b80653bb6aa8518e0a61e85cae4430928078c092.tar.gz
Merge branch 'open-redirect-host-fix' into 'security'
Fix for three open redirect vulns using redirect_to url_for(params.merge))) See merge request !2082
Diffstat (limited to 'app/controllers/dashboard/todos_controller.rb')
-rw-r--r--app/controllers/dashboard/todos_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 498690e8f11..4d7d45787fc 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -7,7 +7,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
@sort = params[:sort]
@todos = @todos.page(params[:page])
if @todos.out_of_range? && @todos.total_pages != 0
- redirect_to url_for(params.merge(page: @todos.total_pages))
+ redirect_to url_for(params.merge(page: @todos.total_pages, only_path: true))
end
end