fixup! implement safe path handling

This commit is contained in:
eternal-flame-AD 2024-07-24 13:05:14 -05:00
parent 6b65fda69d
commit e4026cf022
No known key found for this signature in database

View File

@ -8,8 +8,6 @@ export function safePath(pathIn: string, options: { base: string, noSubDir?: boo
pathIn = path.join(base, pathIn);
const normBase = path.normalize(base);
const normPath = path.normalize(pathIn);
console.log(normBase);
console.log(normPath);
if (normPath !== normBase && normPath.startsWith(normBase)) {
if (options.noSubDir) {