Skip to content

Commit 6a6dad7

Browse files
committed
fixes
1 parent e9edef4 commit 6a6dad7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/helpers/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ exports.deleteSupportFileOrDir = (fileOrDirPath) => {
323323
if (fs.existsSync(resolvedPath)) {
324324
if (fs.lstatSync(resolvedPath).isDirectory()) {
325325
fs.readdirSync(resolvedPath).forEach((file) => {
326-
const currentPath = path.join(resolvedPath, file);
326+
const sanitizedFile = file.replace(/(\.\.\/|\.\/|\/\/)/g, '');
327+
const currentPath = path.join(resolvedPath, sanitizedFile);
327328
fs.unlinkSync(currentPath);
328329
});
329330
fs.rmdirSync(resolvedPath);

0 commit comments

Comments
 (0)