http: clean request path from Git endpoints (#7022)

This commit is contained in:
Joe Chen
2022-06-07 21:11:36 +08:00
committed by GitHub
parent e3706575d5
commit 9bf748b6c4
3 changed files with 17 additions and 5 deletions

View File

@@ -27,6 +27,10 @@ func TestClean(t *testing.T) {
path: "/../a/b/../c/../readme.txt",
wantVal: "a/readme.txt",
},
{
path: "../../objects/info/..",
wantVal: "objects",
},
{
path: "/a/readme.txt",
wantVal: "a/readme.txt",