提交 d75a8297 编写于 作者: R Robert Speicher

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

See https://gitlab.com/gitlab-org/gitlab-ce/issues/22759
上级 7a779981
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
# Values are checked for formatting and exclusion from a list of reserved path # Values are checked for formatting and exclusion from a list of reserved path
# names. # names.
class NamespaceValidator < ActiveModel::EachValidator class NamespaceValidator < ActiveModel::EachValidator
RESERVED = %w( RESERVED = %w[
.well-known
admin admin
all all
assets assets
...@@ -31,7 +32,7 @@ class NamespaceValidator < ActiveModel::EachValidator ...@@ -31,7 +32,7 @@ class NamespaceValidator < ActiveModel::EachValidator
u u
unsubscribes unsubscribes
users users
).freeze ].freeze
def validate_each(record, attribute, value) def validate_each(record, attribute, value)
unless value =~ Gitlab::Regex.namespace_regex unless value =~ Gitlab::Regex.namespace_regex
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册