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>2020-05-26 18:08:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-26 18:08:17 +0300
commitc9d79ef3b5b67792e331a4cc8e6325f3b4a04760 (patch)
tree0b7c48c03e5c59362f975c20fcf84635fddd94e6 /app/models/ci/instance_variable.rb
parent1691cbe307f7698b3ee39811278990c43b6751a5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/instance_variable.rb')
-rw-r--r--app/models/ci/instance_variable.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/instance_variable.rb b/app/models/ci/instance_variable.rb
index 557f3a63280..89ace3f7ede 100644
--- a/app/models/ci/instance_variable.rb
+++ b/app/models/ci/instance_variable.rb
@@ -13,6 +13,11 @@ module Ci
message: "(%{value}) has already been taken"
}
+ validates :encrypted_value, length: {
+ maximum: 1024,
+ too_long: 'The encrypted value of the provided variable exceeds %{count} bytes. Variables over 700 characters risk exceeding the limit.'
+ }
+
scope :unprotected, -> { where(protected: false) }
after_commit { self.class.invalidate_memory_cache(:ci_instance_variable_data) }