Coldfusion 9 Standard Resource Security Problem
We have Coldfusion 9 Standard. We recently upgraded from coldfusion 7 standard. On coldfusion 7 we had resource security turned on by checking the box that says "Enable Coldfusion Sandbox Security". In the Files/Dirs section we had all the folders listed that were required for our applications to run.
When we upgraded to cf9 and tried to use the same settings we started getting errors on pages where we use the CreateObject function to load a cfc. We got a security error that said we need read permission in that folder. These errors go away when I add the read permission for those folders. Doing this fixed most of our problems but we still have a problem that I can't seem to fix.
This error happens when a page on our site is requested. This page includes another page. On the included page CreateObject is called. We get the same security error but the folder that it thinks we need read permission for isn't the correct folder where the cfc actually exists. The security check seems to start at the location of the page that is requested and look for the cfc under that path. Here is an example that will hopefully make this more clear.
/mypages/index.cfm is requested
/mypages/index.cfm includes /includes/template.cfm using cfinclude
/includes/template.cfm calls CreateObject("component","myresources.cfcs.myobject")
The security error says that I need read permission for a folder at this location "D:\myapplication\mypages\myresources\cfcs\"
The cfc is actually at "D:\myapplication\myresources\cfcs\" where D:\myapplication is the web root.
The folder in the security error doesn't exist. However if I add this non-existent folder to the security rules then the security error doesn't happen and the CreateObject call finds the cfc in the correct place.