Skip to content

Commit

Permalink
Update scheduler.go (#7)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lorado committed Jan 9, 2024
1 parent a9585ae commit e138df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit e138df9

Please sign in to comment.