Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent
directory.man
referencing outside the package root (#104)
## What / Why The current `directories.man` handler allows to reach assets outside the package scope. ```js // expand directories.man if (steps.includes('mans') && !data.man && data.directories?.man) { const manDir = data.directories.man const cwd = path.resolve(pkg.path, manDir) const files = await lazyLoadGlob()('**/*.[0-9]', { cwd }) data.man = files.map(man => path.relative(pkg.path, path.join(cwd, man)).split(path.sep).join('/') ) ``` ```js path.resolve(process.cwd(), '/') → '/' system root ``` ## References * continues npm/read-package-json#177 * relates #100
- Loading branch information