diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-30 23:39:56 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-09-04 08:37:36 +0300 |
commit | b9cee4ba3c5e22766de771edde2b8d523ee84993 (patch) | |
tree | 8cfdcb02f48d8ccf1b15e55069829c0d2d4d045d /app/controllers/projects/application_controller.rb | |
parent | ba99dfcde262c91e33b5bf7f86ba7c0e3b6f7e52 (diff) |
Set issuable_sort and diff_view cookies to secure when possible
Closes #49120
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index b4f814fd3a4..695ffd90a85 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -1,4 +1,5 @@ class Projects::ApplicationController < ApplicationController + include CookiesHelper include RoutableActions include ChecksCollaboration @@ -74,7 +75,7 @@ class Projects::ApplicationController < ApplicationController end def apply_diff_view_cookie! - cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present? + set_secure_cookie(:diff_view, params.delete(:view), permanent: true) if params[:view].present? end def require_pages_enabled! |