append-path spec behaviour for repeated /
This commit is contained in:
parent
ac8b971cc0
commit
464d046b5a
@ -84,6 +84,8 @@
|
||||
(false err) (expect (string.match err "path traversal"))))]
|
||||
(expect= (append-path "/tmp" "hello") "/tmp/hello")
|
||||
(expect= (append-path "/tmp/" "hello") "/tmp/hello")
|
||||
(expect= (append-path "/tmp/" "///hello") "/tmp/hello")
|
||||
(expect= (append-path "/tmp/" "///hello/../fish") "/tmp/fish")
|
||||
(traps "/tmp/" "../hello")
|
||||
(expect= (append-path "/tmp/" "hello/../goodbye") "/tmp/goodbye")
|
||||
(traps "/tmp/" "hello/../../goodbye"))
|
||||
|
Loading…
Reference in New Issue
Block a user