From 8563fea03ef86b73bd7f08aa9547d78f372a16fa Mon Sep 17 00:00:00 2001 From: Cade Ayres Date: Sat, 16 Nov 2024 16:59:37 +0000 Subject: [PATCH 1/2] Updated extraction to extract with key of original file path, extracting to a safe location (#1557) --- src/providers/generic/zip/AdmZipProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/generic/zip/AdmZipProvider.ts b/src/providers/generic/zip/AdmZipProvider.ts index d12d14f9..00136632 100644 --- a/src/providers/generic/zip/AdmZipProvider.ts +++ b/src/providers/generic/zip/AdmZipProvider.ts @@ -24,9 +24,9 @@ export default class AdmZipProvider extends ZipProvider { async extractEntryTo(zip: string | Buffer, target: string, outputPath: string): Promise { const adm = new AdmZip(zip); - target = target.replace(/\\/g, '/'); + const safeTarget = target.replace(/\\/g, '/'); outputPath = outputPath.replace(/\\/g, '/'); - var fullPath = path.join(outputPath, target).replace(/\\/g, '/'); + var fullPath = path.join(outputPath, safeTarget).replace(/\\/g, '/'); if(!path.posix.normalize(fullPath).startsWith(outputPath)) { throw Error("Entry " + target + " would extract outside of expected folder"); From 9072fd4f7a2cc7c6bb9ada8528148decabcff262 Mon Sep 17 00:00:00 2001 From: Cade Ayres Date: Sat, 16 Nov 2024 17:20:09 +0000 Subject: [PATCH 2/2] Updated CHANGELOG and versions (#1558) --- CHANGELOG.md | 5 +++++ package.json | 2 +- src/_managerinf/ManagerInformation.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a6a08d7..cb738d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ +### 3.1.54 +#### Bug fix +- Fixed profile import issue where entries were not found inside zips + ### 3.1.53 #### Games added - WEBFISHING +- SULFUR #### Other changes - BONELAB support should now function correctly diff --git a/package.json b/package.json index 69797535..dfe514f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r2modman", - "version": "3.1.53", + "version": "3.1.54", "description": "A simple and easy to use mod manager for many games using Thunderstore.", "productName": "r2modman", "author": "ebkr", diff --git a/src/_managerinf/ManagerInformation.ts b/src/_managerinf/ManagerInformation.ts index b68d2ee9..05752110 100644 --- a/src/_managerinf/ManagerInformation.ts +++ b/src/_managerinf/ManagerInformation.ts @@ -1,7 +1,7 @@ import VersionNumber from '../model/VersionNumber'; export default class ManagerInformation { - public static VERSION: VersionNumber = new VersionNumber('3.1.53'); + public static VERSION: VersionNumber = new VersionNumber('3.1.54'); public static IS_PORTABLE: boolean = false; public static APP_NAME: string = "r2modman"; }