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

See https://gitlab.com/gitlab-org/gitlab-ce/issues/22759
This commit is contained in:
Robert Speicher 2016-09-29 10:36:38 +02:00
parent 7a7799812e
commit d75a8297b8
1 changed files with 3 additions and 2 deletions

View File

@ -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