diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-09-29 10:36:38 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-09-29 10:36:38 +0200 |
commit | d75a8297b82117389bee4d075b1b17747570368d (patch) | |
tree | 37f92ffca295b3a505de4cdbcbefc515b7ece99e /app/validators | |
parent | 7a7799812e9b21c9957e25ec4b48e0648bda20fb (diff) | |
download | gitlab-ce-d75a8297b82117389bee4d075b1b17747570368d.tar.gz |
Add '.well-known' to the list of reserved namespacesrs-blacklist-well-known
See https://gitlab.com/gitlab-org/gitlab-ce/issues/22759
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/namespace_validator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/validators/namespace_validator.rb b/app/validators/namespace_validator.rb index 7a35958cc5f..4dc3b2ab9a0 100644 --- a/app/validators/namespace_validator.rb +++ b/app/validators/namespace_validator.rb @@ -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 |