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:
authorDouwe Maan <douwe@selenight.nl>2018-01-31 20:39:03 +0300
committerDouwe Maan <douwe@selenight.nl>2018-02-06 21:09:03 +0300
commita03d29da1dbbef3c202899cef3cd89b453a8b76f (patch)
tree83f08b67027f9169eac9dfbc6a4c19f1752ad9ff /lib/constraints
parent75144b1e03db342730535f1f49b0e7cd2987d755 (diff)
Validate User username only on Namespace, and bubble up appropriately
Diffstat (limited to 'lib/constraints')
-rw-r--r--lib/constraints/user_url_constrainer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/constraints/user_url_constrainer.rb b/lib/constraints/user_url_constrainer.rb
index b7633aa7cbb..3b3ed1c6ddb 100644
--- a/lib/constraints/user_url_constrainer.rb
+++ b/lib/constraints/user_url_constrainer.rb
@@ -2,7 +2,7 @@ class UserUrlConstrainer
def matches?(request)
full_path = request.params[:username]
- return false unless UserPathValidator.valid_path?(full_path)
+ return false unless NamespacePathValidator.valid_path?(full_path)
User.find_by_full_path(full_path, follow_redirects: request.get?).present?
end