Skip to content

Commit 0eb0852

Browse files
authored
Add more tests
1 parent e00e62d commit 0eb0852

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

test/utils.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1-
good_patterns = ["foo", "foo.bar"]
1+
good_patterns = ["foo", "foo.bar", "oldcommit..newcommit"]
22

33
for pattern in good_patterns
44
@test !URIs.contains_path_traversal(pattern)
55
end
66

7-
bad_patterns = ["../", "..\\", "/..", "\\..", "./", ".\\", "/./", "\\.\\"]
7+
bad_patterns = [
8+
"..foo",
9+
"foo.."
10+
"../",
11+
"..\\",
12+
"/..",
13+
"\\..",
14+
"./",
15+
".\\",
16+
"/./",
17+
"\\.\\",
18+
]
819

920
for pattern in bad_patterns
1021
@test URIs.contains_path_traversal(pattern)

0 commit comments

Comments
 (0)