Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-30 23:39:56 +0300
committerStan Hu <stanhu@gmail.com>2018-09-04 08:37:36 +0300
commitb9cee4ba3c5e22766de771edde2b8d523ee84993 (patch)
tree8cfdcb02f48d8ccf1b15e55069829c0d2d4d045d /app/controllers/projects/application_controller.rb
parentba99dfcde262c91e33b5bf7f86ba7c0e3b6f7e52 (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.rb3
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!