diff --git a/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java b/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java index c83087d7b7..2ed228b623 100755 --- a/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java +++ b/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java @@ -769,6 +769,9 @@ public static Resource getCanonicalResourceEL(Resource res) { catch (IOException e) { return res.getAbsoluteResource(); } + catch (java.nio.file.InvalidPathException ipe) { + return res.getAbsoluteResource(); + } } public static String getNormalizedPathEL(Resource res) { @@ -779,6 +782,9 @@ public static String getNormalizedPathEL(Resource res) { catch (IOException e) { return res.toString(); } + catch (java.nio.file.InvalidPathException ipe) { + return res.toString(); + } } public static Resource getNormalizedResourceEL(Resource res) { @@ -789,6 +795,9 @@ public static Resource getNormalizedResourceEL(Resource res) { catch (IOException e) { return res.getAbsoluteResource(); } + catch (java.nio.file.InvalidPathException ipe) { + return res.getAbsoluteResource(); + } } public static File getCanonicalFileEL(File file) { diff --git a/core/src/main/java/lucee/runtime/PageSourceImpl.java b/core/src/main/java/lucee/runtime/PageSourceImpl.java index f123d4cad1..644627b4e0 100755 --- a/core/src/main/java/lucee/runtime/PageSourceImpl.java +++ b/core/src/main/java/lucee/runtime/PageSourceImpl.java @@ -966,7 +966,7 @@ public PageSource getRealPage(String realPath) { else realPath = realPath.replace('\\', '/'); RefBoolean _isOutSide = new RefBooleanImpl(isOutSide); - if (realPath.indexOf('/') == 0) { + if (realPath.indexOf('/') == 0 || ResourceUtil.isWindowsPath(realPath)) { _isOutSide.setValue(false); } else if (realPath.startsWith("./")) { @@ -983,7 +983,7 @@ public Resource getRealResource(String realPath) { else realPath = realPath.replace('\\', '/'); RefBoolean _isOutSide = new RefBooleanImpl(isOutSide); - if (realPath.indexOf('/') == 0) { + if (realPath.indexOf('/') == 0 || ResourceUtil.isWindowsPath(realPath)) { _isOutSide.setValue(false); } else if (realPath.startsWith("./")) { diff --git a/loader/build.xml b/loader/build.xml index 44d6da234a..44f390f845 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 17029fb09a..8cc22198b2 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.2.0.250-SNAPSHOT + 6.2.0.252-SNAPSHOT jar Lucee Loader Build diff --git a/test/tickets/LDEV4602.cfc b/test/tickets/LDEV4602.cfc index 794d8ec465..189a82847d 100644 --- a/test/tickets/LDEV4602.cfc +++ b/test/tickets/LDEV4602.cfc @@ -1,4 +1,4 @@ -component extends = "org.lucee.cfml.test.LuceeTestCase" { +component extends = "org.lucee.cfml.test.LuceeTestCase" skip=true{ function run( testResults, testBox ){ describe( "bytecode testing", function(){