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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/service/repository/archive.go')
-rw-r--r--internal/service/repository/archive.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/service/repository/archive.go b/internal/service/repository/archive.go
index 3b4ca3630..36d6b47d5 100644
--- a/internal/service/repository/archive.go
+++ b/internal/service/repository/archive.go
@@ -67,7 +67,8 @@ func validateGetArchiveRequest(in *gitalypb.GetArchiveRequest, format string, pa
return helper.ErrInvalidArgumentf("invalid format")
}
- if helper.ContainsPathTraversal(path) {
+ repoPath, _ := helper.GetRepoPath(in.GetRepository())
+ if helper.ContainsPathTraversal(repoPath, path) {
return helper.ErrInvalidArgumentf("path can't contain directory traversal")
}