diff --git a/modules/caddyhttp/caddyhttp_test.go b/modules/caddyhttp/caddyhttp_test.go index a14de7814..84c0271f1 100644 --- a/modules/caddyhttp/caddyhttp_test.go +++ b/modules/caddyhttp/caddyhttp_test.go @@ -65,6 +65,16 @@ func TestSanitizedPathJoin(t *testing.T) { inputPath: "/%2e%2e%2f%2e%2e%2f", expect: filepath.Join("/", "a", "b") + separator, }, + { + inputRoot: "/a/b", + inputPath: "/foo%2fbar", + expect: filepath.Join("/", "a", "b", "foo", "bar"), + }, + { + inputRoot: "/a/b", + inputPath: "/foo%252fbar", + expect: filepath.Join("/", "a", "b", "foo%2fbar"), + }, { inputRoot: "C:\\www", inputPath: "/foo/bar",