diff options
Diffstat (limited to 'http_handle_branches.go')
-rw-r--r-- | http_handle_branches.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/http_handle_branches.go b/http_handle_branches.go index d386b82..01a162a 100644 --- a/http_handle_branches.go +++ b/http_handle_branches.go @@ -10,6 +10,7 @@ import ( "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/storer" + "go.lindenii.runxiyu.org/forge/misc" ) // httpHandleRepoBranches provides the branches page in repos. @@ -24,7 +25,7 @@ func (s *server) httpHandleRepoBranches(writer http.ResponseWriter, _ *http.Requ repo, repoName, groupPath = params["repo"].(*git.Repository), params["repo_name"].(string), params["group_path"].([]string) - if strings.Contains(repoName, "\n") || sliceContainsNewlines(groupPath) { + if strings.Contains(repoName, "\n") || misc.SliceContainsNewlines(groupPath) { notes = append(notes, "Path contains newlines; HTTP Git access impossible") } |