mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
cleanup: move fs helpers into escapingfs
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/hashicorp/nomad/helper"
|
||||
hargs "github.com/hashicorp/nomad/helper/args"
|
||||
"github.com/hashicorp/nomad/helper/escapingfs"
|
||||
"github.com/hashicorp/nomad/lib/cpuset"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
"github.com/hashicorp/nomad/plugins/drivers"
|
||||
@@ -341,7 +342,7 @@ func (t *TaskEnv) replaceEnvClient(arg string) string {
|
||||
// directory path fields of this TaskEnv
|
||||
func (t *TaskEnv) checkEscape(testPath string) bool {
|
||||
for _, p := range []string{t.clientTaskDir, t.clientSharedAllocDir} {
|
||||
if p != "" && !helper.PathEscapesSandbox(p, testPath) {
|
||||
if p != "" && !escapingfs.PathEscapesSandbox(p, testPath) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user