fix: disallow clones of ignored repositories
Alan Pearce alan@alanpearce.eu
Mon, 31 Mar 2025 17:42:05 +0200
1 files changed, 6 insertions(+), 0 deletions(-)
jump to
M routes/handler.go → routes/handler.go
@@ -24,6 +24,12 @@ params["name"] = params["category"] params["category"] = "" } + if d.isNotAllowed(path.Join(params["category"], params["name"])) { + d.Write404(w) + + return + } + if r.URL.RawQuery == "service=git-receive-pack" { w.WriteHeader(http.StatusBadRequest) _, err := w.Write([]byte("no pushing allowed!"))