aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-04-23 16:07:07 -0600
committerFrancis Lavoie <[email protected]>2024-04-23 19:55:18 -0400
commit50cf536677bb9f7a194f4a4ff84f0d61414f8f4b (patch)
tree446c8b9290f497e5517bae54c471bcd5f62257b4
parenta57a6d876c826ea9f7ef28de35b2de53cde9fa38 (diff)
downloadcaddy-go120-issue5288.tar.gz
caddy-go120-issue5288.zip
-rw-r--r--modules/caddyhttp/caddyhttp_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/caddyhttp_test.go b/modules/caddyhttp/caddyhttp_test.go
index e457d9542..4763c383e 100644
--- a/modules/caddyhttp/caddyhttp_test.go
+++ b/modules/caddyhttp/caddyhttp_test.go
@@ -65,7 +65,7 @@ func TestSanitizedPathJoin(t *testing.T) {
{
inputRoot: "/a/b",
inputPath: "/%2e%2e%2f%2e%2e%2f",
- expect: filepath.Join("/", "a", "b"),
+ expect: "/a/b", // inputPath fails the IsLocal test so only the root is returned
},
{
inputRoot: "/a/b",
@@ -86,7 +86,7 @@ func TestSanitizedPathJoin(t *testing.T) {
inputRoot: "C:\\www",
inputPath: "/D:\\foo\\bar",
expect: filepath.Join("C:\\www", "D:\\foo\\bar"),
- expectWindows: filepath.Join("C:\\www"),
+ expectWindows: filepath.Join("C:\\www"), // inputPath fails IsLocal on Windows
},
{
// https://github.com/golang/go/issues/56336#issuecomment-1416214885