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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-08 12:17:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-08 12:17:44 +0300
commit60028378dd5e5e7844810e4a2aa2934a58f738ca (patch)
tree61db78141f7684741a0ed22ac5b43361c571f4db /lib/gitlab/json_cache.rb
parent8986fe34837f7af1df90482c049a1578610cdb94 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/json_cache.rb')
-rw-r--r--lib/gitlab/json_cache.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/json_cache.rb b/lib/gitlab/json_cache.rb
index d2916a01809..d5c018cfc68 100644
--- a/lib/gitlab/json_cache.rb
+++ b/lib/gitlab/json_cache.rb
@@ -43,7 +43,9 @@ module Gitlab
end
def write(key, value, options = nil)
- backend.write(cache_key(key), value.to_json, options)
+ # As we use json as the serialization format, return everything from
+ # ActiveModel objects included encrypted values.
+ backend.write(cache_key(key), value.to_json(unsafe_serialization_hash: true), options)
end
def fetch(key, options = {}, &block)