Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-06 21:26:58 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-07 10:43:35 +0300
commite6cc7a0a38927d3874f076900308f46c533a4e1d (patch)
tree6b47dc33e089f61d8e1e2c05d28df071ca3ce81f /app/validators/project_path_validator.rb
parent6b2d4947a6300f006fd46360161687fd19e18659 (diff)
Restrict nested group names to prevent ambiguous routes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/validators/project_path_validator.rb')
-rw-r--r--app/validators/project_path_validator.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/validators/project_path_validator.rb b/app/validators/project_path_validator.rb
index 36279daa743..ee2ae65be7b 100644
--- a/app/validators/project_path_validator.rb
+++ b/app/validators/project_path_validator.rb
@@ -14,10 +14,8 @@ class ProjectPathValidator < ActiveModel::EachValidator
# without tree as reserved name routing can match 'group/project' as group name,
# 'tree' as project name and 'deploy_keys' as route.
#
- RESERVED = (NamespaceValidator::RESERVED -
- %w[dashboard help ci admin search notes services assets profile public] +
- %w[tree commits wikis new edit create update logs_tree
- preview blob blame raw files create_dir find_file]).freeze
+ RESERVED = (NamespaceValidator::STRICT_RESERVED -
+ %w[dashboard help ci admin search notes services assets profile public]).freeze
def self.valid?(value)
!reserved?(value)