From a03d29da1dbbef3c202899cef3cd89b453a8b76f Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 31 Jan 2018 11:39:03 -0600 Subject: Validate User username only on Namespace, and bubble up appropriately --- lib/constraints/user_url_constrainer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/constraints/user_url_constrainer.rb') 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 -- cgit v1.2.1