strange path error when including file from outside the webroot

Description

found with this test case https://github.com/lucee/Lucee/pull/2153 (5 & 6 are the same)

var f=getTempFile(getTempDirectory(), "bytecode", "cfm"); fileWrite( f, arrayToList(a, chr(10) ) ); cfinclude(template=f); // f ißoutside the webroot

it’s prepending the path / mapping for some reason

on windows it’s the mapping being prepended

/test/tickets/C:/work/lucee6/temp/archive/base/lucee-server/context/temp/bytecode21.cfm

[java] [script] -> JUnitReport: C:\work\lucee6\test/reports/junit-test-results-6.0.0.490-SNAPSHOT.xml [java] [script] Errored: test.tickets.LDEV2127 [java] [script] test writing out huge 1.5mb file for bytecode memory usuage [java] [script] Page [/test/tickets/C:/work/lucee6/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] [C:\work\lucee6\test\tickets\C:\work\lucee6\temp\archive\base\lucee-server\context\temp\bytecode21.cfm] not found [java] [script] C:\work\lucee6\test\tickets\LDEV2127.cfc:18 [java] [script] C:\work\lucee6\test\_testRunner.cfc:275 [java] [script] C:\work\lucee6\test\run-tests.cfm:260 [java] [script] [java] [script] lucee.runtime.exp.MissingIncludeException: Page [/test/tickets/C:/work/lucee6/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] [C:\work\lucee6\test\tickets\C:\work\lucee6\temp\archive\base\lucee-server\context\temp\bytecode21.cfm] not found [java] [script] at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:1027) [java] [script] at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1053) [java] [script] at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:950) [java] [script] at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:931) [java] [script] at tickets.ldev2127_cfc$cf.udfCall(/test/tickets/LDEV2127.cfc:18)

on linux it’s the ant directory being prepended?

/home/runner/work/Lucee/Lucee/ant/home/runner/work/Lucee/Lucee/temp/archive/base/lucee-server/context/temp/bytecode21.cfm

[INFO] [java] [script] test writing out huge 1.5mb file for bytecode memory usuage [INFO] [java] [script] Page [/home/runner/work/Lucee/Lucee/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] [/home/runner/work/Lucee/Lucee/ant/home/runner/work/Lucee/Lucee/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] not found [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/tickets/LDEV3578.cfc:19 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/_testRunner.cfc:275 [INFO] [java] [script] /home/runner/work/Lucee/Lucee/test/run-tests.cfm:260 [INFO] [java] [script] [INFO] [java] [script] lucee.runtime.exp.MissingIncludeException: Page [/home/runner/work/Lucee/Lucee/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] [/home/runner/work/Lucee/Lucee/ant/home/runner/work/Lucee/Lucee/temp/archive/base/lucee-server/context/temp/bytecode21.cfm] not found [INFO] [java] [script] at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:1027) [INFO] [java] [script] at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1053) [INFO] [java] [script] at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:950) [INFO] [java] [script] at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:931) [INFO] [java] [script] at tickets.ldev3578_cfc$cf.udfCall(/test/tickets/LDEV3578.cfc:19)

Environment

None

Activity

Show:

Pothys - MitrahSoft 3 July 2023 at 15:32

I've checked this issue with lucee 6.0.0.492-SNAPSHOT. I faced the same issue when using cfinclude with outside webroot file.

Zac Spitzer 1 July 2023 at 12:31

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 1 July 2023 at 12:07
Updated 26 March 2025 at 17:36

Flag notifications