mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 01:15:43 +03:00
Do not allow path to escape the alloc dir for the FS commands
This commit is contained in:
@@ -856,7 +856,13 @@ func blockUntilNextLog(fs allocdir.AllocDirFS, t *tomb.Tomb, logPath, task, logT
|
||||
next := make(chan error, 1)
|
||||
|
||||
go func() {
|
||||
eofCancelCh := fs.BlockUntilExists(nextPath, t)
|
||||
eofCancelCh, err := fs.BlockUntilExists(nextPath, t)
|
||||
if err != nil {
|
||||
next <- err
|
||||
close(next)
|
||||
return
|
||||
}
|
||||
|
||||
scanCh := time.Tick(nextLogCheckRate)
|
||||
for {
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user