From 5147cd60f141434f82ce95cc9039afddf415f02b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 Aug 2021 12:09:57 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- GITALY_SERVER_VERSION | 2 +- .../components/ci_variable_modal.vue | 23 +++++ .../javascripts/ci_variable_list/constants.js | 4 + .../javascripts/ci_variable_list/index.js | 2 + app/views/ci/variables/_index.html.haml | 1 + doc/ci/variables/index.md | 20 +++++ lib/gitlab/database.rb | 5 ++ locale/gitlab.pot | 6 ++ .../components/ci_variable_modal_spec.js | 23 +++++ spec/support/before_all_adapter.rb | 27 ++++++ spec/support/database/prevent_cross_joins.rb | 84 +++++++++++++++++++ spec/support/db_cleaner.rb | 8 +- .../database/prevent_cross_joins_spec.rb | 56 +++++++++++++ 13 files changed, 259 insertions(+), 2 deletions(-) create mode 100644 spec/support/before_all_adapter.rb create mode 100644 spec/support/database/prevent_cross_joins.rb create mode 100644 spec/support_specs/database/prevent_cross_joins_spec.rb diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 7e30f2c005d..df0556ead12 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -c2ad49fbbf325f45bd31e307451cbf2982a4f647 +6430f0f4df82aecc0b282d8fb620d1d9219a6aee diff --git a/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue b/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue index 12def6e7eef..03fd600e493 100644 --- a/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue +++ b/app/assets/javascripts/ci_variable_list/components/ci_variable_modal.vue @@ -24,6 +24,7 @@ import { ADD_CI_VARIABLE_MODAL_ID, AWS_TIP_DISMISSED_COOKIE_NAME, AWS_TIP_MESSAGE, + CONTAINS_VARIABLE_REFERENCE_MESSAGE, } from '../constants'; import CiEnvironmentsDropdown from './ci_environments_dropdown.vue'; import { awsTokens, awsTokenList } from './ci_variable_autocomplete_tokens'; @@ -33,6 +34,7 @@ export default { tokens: awsTokens, tokenList: awsTokenList, awsTipMessage: AWS_TIP_MESSAGE, + containsVariableReferenceMessage: CONTAINS_VARIABLE_REFERENCE_MESSAGE, components: { CiEnvironmentsDropdown, GlAlert, @@ -70,6 +72,7 @@ export default { 'awsTipDeployLink', 'awsTipCommandsLink', 'awsTipLearnLink', + 'containsVariableReferenceLink', 'protectedEnvironmentVariablesLink', 'maskedEnvironmentVariablesLink', ]), @@ -99,6 +102,10 @@ export default { const regex = RegExp(this.maskableRegex); return regex.test(this.variable.secret_value); }, + containsVariableReference() { + const regex = RegExp(/\$/); + return regex.test(this.variable.secret_value); + }, displayMaskedError() { return !this.canMask && this.variable.masked; }, @@ -328,6 +335,22 @@ export default { + + + + + +