@marcel91200 / caddy Mirror · read-only / commits / bde46211
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 18:15 UTC

caddyhttp: Test cases for `%2F` and `%252F` (#6084)

Francis Lavoie committed Feb 7, 2024 at 05:13 UTC bde46211e311e1e9009e8c5160ead08f6baf1c02
1 file changed +10
modules/caddyhttp/caddyhttp_test.go
+10
@@ -65,6 +65,16 @@ func TestSanitizedPathJoin(t *testing.T) {
65 inputPath: "/%2e%2e%2f%2e%2e%2f",
66 expect: filepath.Join("/", "a", "b") + separator,
67 },
68 + {
69 + inputRoot: "/a/b",
70 + inputPath: "/foo%2fbar",
71 + expect: filepath.Join("/", "a", "b", "foo", "bar"),
72 + },
73 + {
74 + inputRoot: "/a/b",
75 + inputPath: "/foo%252fbar",
76 + expect: filepath.Join("/", "a", "b", "foo%2fbar"),
77 + },
78 {
79 inputRoot: "C:\\www",
80 inputPath: "/foo/bar",