From 11e9b7b58837da351f08c18e6f0f4faba4d7d301 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 29 Jun 2020 19:21:38 +0000 Subject: Add latest changes from gitlab-org/security/gitlab@13-1-stable-ee --- app/models/group.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/models') 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 } -- cgit v1.2.1