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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-30 16:41:51 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-30 16:41:51 +0300
commitcf042068b5f69b416640f9a4fcb21fbec1082268 (patch)
tree1221cbd140f3399d8ade3d92a9224fbb94f5e375 /app/services/auth
parentfffc8a59d7f193e451daace7c69f33603c906e8f (diff)
Do not allow registry requests for invalid repositories
Diffstat (limited to 'app/services/auth')
-rw-r--r--app/services/auth/container_registry_authentication_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index 839f514ad58..dcb728b6151 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -64,6 +64,10 @@ module Auth
end
def process_repository_access(type, path, actions)
+ # TODO, add specs for invalid paths
+ #
+ return unless path.valid?
+
requested_project = path.repository_project
return unless requested_project