summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-09-29 10:36:38 +0200
committerRobert Speicher <rspeicher@gmail.com>2016-09-29 10:36:38 +0200
commitd75a8297b82117389bee4d075b1b17747570368d (patch)
tree37f92ffca295b3a505de4cdbcbefc515b7ece99e
parent7a7799812e9b21c9957e25ec4b48e0648bda20fb (diff)
downloadgitlab-ce-rs-blacklist-well-known.tar.gz
Add '.well-known' to the list of reserved namespacesrs-blacklist-well-known
See https://gitlab.com/gitlab-org/gitlab-ce/issues/22759
-rw-r--r--app/validators/namespace_validator.rb5
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