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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-05-16 12:04:47 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-05-16 12:11:18 +0300
commit9645623a23b51be7d1525e765d532bef198380df (patch)
tree56aa3adc4586eb60915ddded3e5094f1c09bc4a9
parent42fab8fc526215f9426bc9f459f9e6da0951c574 (diff)
git: Sync internal namespaces with distros' settings
Repositories hosted by Gitaly have several internal reference namespaces that shouldn't be modified by clients e.g. by pushing to them. And while we have the infrastructure in place already to ensure that writes are restricted, the list of internal namespace is not in sync with the list of namespaces configured in both Omnibus and CNG. Most notably, we're missing both the `refs/tmp/` and `refs/remotes/` namespaces. Add the missing namespaces to ensure that we're not regressing our safety guards in this area when we remove the gitconfig in our distros. Changelog: changed
-rw-r--r--internal/git/reference.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/git/reference.go b/internal/git/reference.go
index 8f2c34981..66cf70883 100644
--- a/internal/git/reference.go
+++ b/internal/git/reference.go
@@ -15,6 +15,8 @@ var InternalRefPrefixes = [...]string{
"refs/keep-around/",
"refs/merge-requests/",
"refs/pipelines/",
+ "refs/remotes/",
+ "refs/tmp/",
}
// Revision represents anything that resolves to either a commit, multiple