diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-07 12:42:35 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-07 12:42:35 +0300 |
commit | 9e421d6d4e7eb6564f7a21db8921f6f8163b0b90 (patch) | |
tree | 5aed6d16627e751301a7c0e25bd1a8fc2ddcc3c4 /app/models | |
parent | 2006724e9354df4cb9386ef57a39d08022400f4f (diff) | |
parent | 136865713bbaeee03e45e9e7154dd99338d565d6 (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.rb | 5 |
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] } |