summaryrefslogtreecommitdiff
path: root/app/models/group.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 19:21:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 19:21:38 +0000
commit11e9b7b58837da351f08c18e6f0f4faba4d7d301 (patch)
treed9b28159a53c3814c8a2e6b33a5f01557b757439 /app/models/group.rb
parent2b0b97e746e327c6168505df7740e667b690a27f (diff)
downloadgitlab-ce-11e9b7b58837da351f08c18e6f0f4faba4d7d301.tar.gz
Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index dd7624ab420..71f58a5fd1a 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -73,9 +73,12 @@ class Group < Namespace
validates :variables, variable_duplicates: true
validates :two_factor_grace_period, presence: true, numericality: { greater_than_or_equal_to: 0 }
+
validates :name,
- format: { with: Gitlab::Regex.group_name_regex,
- message: Gitlab::Regex.group_name_regex_message }, if: :name_changed?
+ html_safety: true,
+ format: { with: Gitlab::Regex.group_name_regex,
+ message: Gitlab::Regex.group_name_regex_message },
+ if: :name_changed?
add_authentication_token_field :runners_token, encrypted: -> { Feature.enabled?(:groups_tokens_optional_encryption, default_enabled: true) ? :optional : :required }