Existence of onRequest() changes behavior of files included via app mappings

Description

Attached is a repro case. Unzip it and run the following

The index.cfm file from the web root will load. Note there is a web server alias that points /fake to the web root and there is also a matching Applicatin.cfc this.mappings that also points /fake to the web root.

Now, remove or rename the onRequest() method in the Application.cfc and refresh the page. Now you will receive an error:

It seems that the cfinclude inside the onRequest() method is "aware" of the /fake CF mapping, but when you remove that method, whatever code inside Lucee which runs the template is not aware of the CF mapping because the behavior changes.

Environment

None

Attachments

3

Activity

Show:

Pothys - MitrahSoft 19 April 2021 at 12:28

I've checked this ticket and confirmed the issue happened in lucee latest version 5.3.8.170-SNAPSHOT also. While using cfinclude within the onRequest method check the application mappings and load the file. When removing the onRequest method it runs the template that changes the behavior of the file include. Seems ACF always checks the application mappings in this scenario.

I delete the index. cfm and tested with it. There is two different stack Trace here.

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/PageContextImpl.java#L904
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/PageContextImpl.java#L867

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

Created 16 April 2021 at 20:46
Updated 19 April 2021 at 13:11