Improve make_safe_uri coverage.

This commit is contained in:
Emil Mikulic 2021-03-21 15:31:04 +11:00
parent f3acb93b93
commit 9222bbc9d8
2 changed files with 3 additions and 0 deletions

View File

@ -236,6 +236,7 @@ def setUpModule():
["no leading slash", "dir/../", "assertIsInvalid"],
["invalid up dir", "/../", "assertIsInvalid"],
["fancy invalid up dir", "/./dir/./../../", "assertIsInvalid"],
["extra slashes 2", "//.d", "assertNotFound"],
["not found", "/not_found.txt", "assertNotFound"],
["forbidden", "/forbidden/x", "assertForbidden"],
["unreadable", "/unreadable/", "assertUnreadable"],

View File

@ -31,6 +31,8 @@ static char const *tests[] = {
"/", "/",
"/.", "/",
"/./", "/",
"/.d", "/.d",
"//.d", "/.d",
"/../", NULL,
"/abc", "/abc",
"/abc/", "/abc/",