Skip to content

Commit d769775

Browse files
Update aikido_zen/sinks/tests/os_test.py
Co-authored-by: Hans Ott <hansott@hotmail.be>
1 parent 871d2a2 commit d769775

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

aikido_zen/sinks/tests/os_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ def test_os_create_path_with_multiple_slashes():
7979
with pytest.raises(AikidoPathTraversal):
8080
full_path = Path("flaskr/resources/blogs/") / file_path
8181
open(full_path, "r").close()
82+
83+
def test_os_create_path_with_multiple_double_slashes():
84+
import os
85+
86+
file_path = "////etc//passwd"
87+
set_context(file_path)
88+
with pytest.raises(AikidoPathTraversal):
89+
full_path = Path("flaskr/resources/blogs/") / file_path
90+
open(full_path, "r").close()
8291

8392

8493
def test_ospath_command_absolute_path():

0 commit comments

Comments
 (0)