We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9edef4 commit 6a6dad7Copy full SHA for 6a6dad7
bin/helpers/helper.js
@@ -323,7 +323,8 @@ exports.deleteSupportFileOrDir = (fileOrDirPath) => {
323
if (fs.existsSync(resolvedPath)) {
324
if (fs.lstatSync(resolvedPath).isDirectory()) {
325
fs.readdirSync(resolvedPath).forEach((file) => {
326
- const currentPath = path.join(resolvedPath, file);
+ const sanitizedFile = file.replace(/(\.\.\/|\.\/|\/\/)/g, '');
327
+ const currentPath = path.join(resolvedPath, sanitizedFile);
328
fs.unlinkSync(currentPath);
329
});
330
fs.rmdirSync(resolvedPath);
0 commit comments