diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-07 13:15:27 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-07 13:15:27 +0000 |
commit | 25ef3a9687494bea8927d7109f6e684beba2eb95 (patch) | |
tree | df93c1ce4c1f2ea96918ff6a5f01568de3590bab /app/helpers | |
parent | 2320e4451fa0c0c60326a7d29fa53599559b6484 (diff) | |
parent | 6a90249b6a9c14391bf1ada9bb4726e8bf1e4ffd (diff) | |
download | gitlab-ce-25ef3a9687494bea8927d7109f6e684beba2eb95.tar.gz |
Merge branch 'thomas-nilsson-irfu/gitlab-ce-thomas-nilsson-irfu-master-patch-13137' into 'master'
Allow masking if 8 or more characters in base64
See merge request gitlab-org/gitlab-ce!29143
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/ci_variables_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/ci_variables_helper.rb b/app/helpers/ci_variables_helper.rb index e313015c937..fc51f00d052 100644 --- a/app/helpers/ci_variables_helper.rb +++ b/app/helpers/ci_variables_helper.rb @@ -27,4 +27,8 @@ module CiVariablesHelper %w(File file) ] end + + def ci_variable_maskable_regex + Maskable::REGEX.inspect.sub('\\A', '^').sub('\\z', '$').sub(/^\//, '').sub(/\/[a-z]*$/, '').gsub('\/', '/') + end end |