diff --git a/AUTHORS b/AUTHORS index adfcfaa851..b8c58ab09a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ Aanand Prasad Aaron Feng Abel MuiƱo +Aleksa Sarai Alexander Larsson Alexey Shamrin Alex Gaynor diff --git a/daemon/container.go b/daemon/container.go index 7b6b65494e..7250b442a6 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -745,8 +745,13 @@ func (container *Container) Copy(resource string) (io.ReadCloser, error) { if err := container.Mount(); err != nil { return nil, err } + var filter []string + + // Ensure path is local to container basefs + resource = path.Join("/", resource) basePath := path.Join(container.basefs, resource) + stat, err := os.Stat(basePath) if err != nil { container.Unmount()