At least on node v4/v6, Path.relative returns .. when a directory is compared with its immediate parent. This will cause insideSandbox to return true even though the parent isn't inside the sandbox, since it's looking for ../. I think this can be fixed by just comparing against .. instead; I can't think of any situations where that would cause issues.
At least on node v4/v6,
Path.relativereturns..when a directory is compared with its immediate parent. This will causeinsideSandboxto return true even though the parent isn't inside the sandbox, since it's looking for../. I think this can be fixed by just comparing against..instead; I can't think of any situations where that would cause issues.