mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-24 22:24:54 +01:00
caddyhttp: Test cases for %2F
and %252F
(#6084)
This commit is contained in:
parent
bc1e63198d
commit
bde46211e3
1 changed files with 10 additions and 0 deletions
|
@ -65,6 +65,16 @@ func TestSanitizedPathJoin(t *testing.T) {
|
||||||
inputPath: "/%2e%2e%2f%2e%2e%2f",
|
inputPath: "/%2e%2e%2f%2e%2e%2f",
|
||||||
expect: filepath.Join("/", "a", "b") + separator,
|
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",
|
inputRoot: "C:\\www",
|
||||||
inputPath: "/foo/bar",
|
inputPath: "/foo/bar",
|
||||||
|
|
Loading…
Add table
Reference in a new issue