From e04027854c8b5cb6be742cc8a15da8c78a1dbdca Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 30 Jul 2024 14:02:42 +0530 Subject: [PATCH] fixed SRE issues --- src/commands/app/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/app/create.ts b/src/commands/app/create.ts index 048ae66..5dc862b 100644 --- a/src/commands/app/create.ts +++ b/src/commands/app/create.ts @@ -232,7 +232,7 @@ export default class Create extends BaseCommand { // Get the directory inside the zip file const zipEntries = zip.getEntries(); const firstEntry = zipEntries[0]; - const sourcePath = resolve(dataDir, firstEntry.entryName.split("/")[0]); + const sourcePath = resolve(sanitizePath(dataDir), sanitizePath(firstEntry.entryName.split("/")[0])); if (this.flags["data-dir"] && !existsSync(this.flags["data-dir"])) { mkdirSync(this.flags["data-dir"], { recursive: true });