From 00b7e3bd13b7914a44c5af00ff6f8da9b48fa9c5 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Tue, 22 Nov 2022 14:20:17 -0500 Subject: Fix path parse unit tests --- tests/api/test_eval.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/api/test_eval.py') diff --git a/tests/api/test_eval.py b/tests/api/test_eval.py index 259cf0d..65cd9a4 100644 --- a/tests/api/test_eval.py +++ b/tests/api/test_eval.py @@ -46,7 +46,9 @@ class TestEvalResource(SnekAPITestCase): "file.txt", "./file.jpg", "path/to/file", + "folder/../hm", "folder/./to/./somewhere", + "traversal/but/../not/beyond/../root", ] for path in test_paths: with self.subTest(path=path): @@ -60,8 +62,9 @@ class TestEvalResource(SnekAPITestCase): """Traversal beyond root, should be denied with 400 error.""" test_paths = [ "../secrets", + "../../dir", "dir/../../secrets", - "folder/./hm", + "dir/var/../../../file", ] for path in test_paths: with self.subTest(path=path): -- cgit v1.2.3