diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-26 18:08:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-26 18:08:17 +0300 |
commit | c9d79ef3b5b67792e331a4cc8e6325f3b4a04760 (patch) | |
tree | 0b7c48c03e5c59362f975c20fcf84635fddd94e6 /app/models/ci/instance_variable.rb | |
parent | 1691cbe307f7698b3ee39811278990c43b6751a5 (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.rb | 5 |
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) } |