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:
authorGrzegorz Bizon <grzegorz@gitlab.com>2019-08-07 12:42:35 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-08-07 12:42:35 +0300
commit9e421d6d4e7eb6564f7a21db8921f6f8163b0b90 (patch)
tree5aed6d16627e751301a7c0e25bd1a8fc2ddcc3c4 /app/models
parent2006724e9354df4cb9386ef57a39d08022400f4f (diff)
parent136865713bbaeee03e45e9e7154dd99338d565d6 (diff)
Merge branch 'mc/feature/add-at-colon-variable-masking' into 'master'
Allow masking @ and : characters Closes #63043 See merge request gitlab-org/gitlab-ce!31065
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/maskable.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/concerns/maskable.rb b/app/models/concerns/maskable.rb
index e0f2c41b836..d70e47bc4ff 100644
--- a/app/models/concerns/maskable.rb
+++ b/app/models/concerns/maskable.rb
@@ -7,9 +7,10 @@ module Maskable
# * No escape characters
# * No variables
# * No spaces
- # * Minimal length of 8 characters from the Base64 alphabets (RFC4648)
+ # * Minimal length of 8 characters
+ # * Characters must be from the Base64 alphabet (RFC4648) with the addition of @ and :
# * Absolutely no fun is allowed
- REGEX = /\A[a-zA-Z0-9_+=\/-]{8,}\z/.freeze
+ REGEX = /\A[a-zA-Z0-9_+=\/@:-]{8,}\z/.freeze
included do
validates :masked, inclusion: { in: [true, false] }