From 774440d0a72d7ee0710effa3ffbdc9931f0e84b5 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 27 Jul 2023 17:50:08 +1000 Subject: [PATCH] Fix path problem in NpmPackage --- .../src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java index 2e6b697c3..a9098c50a 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java @@ -462,7 +462,7 @@ public class NpmPackage { while ((entry = (TarArchiveEntry) tarIn.getNextEntry()) != null) { String n = entry.getName(); - if (n.contains("..")) { + if (n.contains("/..") || n.contains("../")) { throw new RuntimeException("Entry with an illegal name: " + n); } if (entry.isDirectory()) {