From f55c5a9834d7fbd10cf066a0a9aad04f56c10ae7 Mon Sep 17 00:00:00 2001 From: fg0x0 Date: Thu, 19 Mar 2026 11:00:04 +0000 Subject: [PATCH] fix: ensure separator boundary in allowFsRead wildcard check --- src/modules/fileloading.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/fileloading.js b/src/modules/fileloading.js index 1e1748e8a..735574e76 100644 --- a/src/modules/fileloading.js +++ b/src/modules/fileloading.js @@ -156,7 +156,7 @@ import { jsPDF } from "../jspdf.js"; if (starIndex >= 0) { const fixedPart = allowedUrl.substring(0, starIndex); let resolved = path.resolve(fixedPart); - if (fixedPart.endsWith(path.sep) && !resolved.endsWith(path.sep)) { + if (!resolved.endsWith(path.sep)) { resolved += path.sep; } return url.startsWith(resolved);