fix(http): canonicalize paths before checking access rules (#6045)

This commit is contained in:
Henrique Dias authored and GitHub committed 2026-07-26 10:00:18 +02:00
1 parent 41e2b1bbba
commit e6d70cf24c
15 files changed
+403 -31

No files matched your search

-7
View File
@@ -17,13 +17,6 @@ import (
"github.com/mholt/archives"
)
func slashClean(name string) string {
if name == "" || name[0] != '/' {
name = "/" + name
}
return gopath.Clean(name)
}
func parseQueryFiles(r *http.Request, f *files.FileInfo, _ *users.User) ([]string, error) {
var fileSlice []string
names := strings.Split(r.URL.Query().Get("files"), ",")