diff options
author | Joe Chen <jc@unknwon.io> | 2022-06-07 21:11:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 21:11:36 +0800 |
commit | 9bf748b6c4c9a17d3aa77f6b9abcfae65451febf (patch) | |
tree | 61e92de48f48737d3df7d62e178af79006d96e09 /internal/pathutil | |
parent | e3706575d5d95fee19b8170c510c4fc567d079a3 (diff) |
http: clean request path from Git endpoints (#7022)
Diffstat (limited to 'internal/pathutil')
-rw-r--r-- | internal/pathutil/pathutil_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/pathutil/pathutil_test.go b/internal/pathutil/pathutil_test.go index d20e537a..7444c82a 100644 --- a/internal/pathutil/pathutil_test.go +++ b/internal/pathutil/pathutil_test.go @@ -28,6 +28,10 @@ func TestClean(t *testing.T) { wantVal: "a/readme.txt", }, { + path: "../../objects/info/..", + wantVal: "objects", + }, + { path: "/a/readme.txt", wantVal: "a/readme.txt", }, |