From e138df9c8844732e6b7dc44238564f16379276c8 Mon Sep 17 00:00:00 2001 From: lorado Date: Tue, 9 Jan 2024 04:47:44 +0100 Subject: [PATCH] Update scheduler.go (#7) Fix issue when containerID returns `/../..`, so that when it filters the returned string, it identifies containerID `..`, and then fails at the end, bc this is invalid container id --- scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheduler.go b/scheduler.go index 02d422b..f4113c4 100644 --- a/scheduler.go +++ b/scheduler.go @@ -220,7 +220,7 @@ func containerID() (string, error) { return "", fmt.Errorf("detect container ID: %w", err) } id := filepath.Base(strings.TrimSpace(string(data))) - if id == "/" { + if id == "/" || id == ".." { return "", fmt.Errorf("calculate container ID from %s: %w", string(data), err) }