Server-Mapped CFML Resources Can Use Inappropriate Application.cfc

Description

Given the following tree:

Requests for the following are (I think) inappropriately under the influence of wwwroot/Application.cfc.

  • deployment_root/model/com/acme/Remote.cfc?method=helloWorld

  • deployment_root/model/com/acme/index.cfm

It's possible to sever the relationship by introducing an Application.cfc at, say, the model/, level, but I wouldn't think that would be necessary.

This repo demonstrates the problem, which is shown in logging (wwwroot/Application.cfc's onRequestStart() is triggered).

Activity

John Farrar 
9 April 2018 at 12:25
(edited)

If someone has created a virtual folder and is using code from a source outside the web paths then it seems like they would want to use the Application.cfc in the web path. Your point seems accurate also, that there are times were that is not wanted. So a universal change that may break things badly for those with mappings.

Michael Offner 
19 May 2016 at 09:16

Lucee goes down the mappings not the physical directories as ACF does. in that case ACf would search down to the filesystem root!
Let say model points to "C:/whatever/webs/susi/model"
ACF searches for the application.cfc down to "c:/", because it never pass the webroot, what is clearly a bug in our opinion, so we decided to handle this different in Railo/Lucee.

When you call for example /model/com/acme, lucee looks at the following locations for the application.cfc
/model/com/acme
/model/com
/model
/
when one of this pathes points to a different directory because of a mapping, lucee looks in that place.

Details

Assignee

Reporter

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

Affects versions

Priority

Created 18 May 2016 at 17:09
Updated 9 April 2018 at 12:27