mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-20 14:11:11 +00:00
Validate User username only on Namespace, and bubble up appropriately
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user