mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-13 22:36:27 +03: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",
|
||||
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",
|
||||
|
|
Loading…
Reference in a new issue