summaryrefslogtreecommitdiff
path: root/internal/ctlsock/sanitize_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ctlsock/sanitize_test.go')
-rw-r--r--internal/ctlsock/sanitize_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/ctlsock/sanitize_test.go b/internal/ctlsock/sanitize_test.go
index dfcb62c..bfdf0a7 100644
--- a/internal/ctlsock/sanitize_test.go
+++ b/internal/ctlsock/sanitize_test.go
@@ -15,6 +15,10 @@ func TestSanitizePath(t *testing.T) {
{"/foo/", "foo"},
{"/foo/./foo", "foo/foo"},
{"./", ""},
+ {"..", ""},
+ {"foo/../..", ""},
+ {"foo/../../aaaaaa", ""},
+ {"/foo/../../aaaaaa", ""},
}
for _, tc := range testCases {
res := SanitizePath(tc[0])