docs: path traversal vulnerabilities when customizing FS

This commit is contained in:
Harttle
2021-12-11 12:31:08 +08:00
committed by Harttle
parent cc4628d804
commit 6023d9ba10
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ export interface FS {
readFileSync: (filepath: string) => string;
/** resolve a file against directory, for given `ext` option */
resolve: (dir: string, file: string, ext: string) => string;
/** check if file is contained in `root`, always return `true` by default */
/** check if file is contained in `root`, always return `true` by default. Warning: not setting this could expose path traversal vulnerabilities. */
contains?: (root: string, file: string) => boolean;
/** defaults to "/" */
sep?: string;