Commit 4754123e authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rs-blacklist-well-known' into 'master'

Add '.well-known' to the list of reserved namespaces

See https://gitlab.com/gitlab-org/gitlab-ce/issues/22759

See merge request !6585
parents dbfcccaf d75a8297
......@@ -5,7 +5,8 @@
# Values are checked for formatting and exclusion from a list of reserved path
# names.
class NamespaceValidator < ActiveModel::EachValidator
RESERVED = %w(
RESERVED = %w[
.well-known
admin
all
assets
......@@ -31,7 +32,7 @@ class NamespaceValidator < ActiveModel::EachValidator
u
unsubscribes
users
).freeze
].freeze
def validate_each(record, attribute, value)
unless value =~ Gitlab::Regex.namespace_regex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment