Skip to main content
December 30, 2009
Question

Coldfusion 9 Standard Resource Security Problem

  • December 30, 2009
  • 2 replies
  • 463 views

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.

    This topic has been closed for replies.

    2 replies

    December 31, 2009

    The only thing in the custom tag paths is the one for the default CustomTags folder in the cf installation folder.

    There is something I forgot to mention in the original post.  In our setup the folder named "myresources" in my example is a virtual directory in IIS.  It is not actually in the site root.  But like I said this didn't seem to be a problem in cf 7.

    Owainnorth
    Inspiring
    December 31, 2009

    Do you have any custom tag paths defined in CFAdmin? I've seen wierdies like this before where Coldfusion reads in the custom tag paths first, then tries to access them from Sandboxed sites and fails.

    We now use Custom Tag Paths and Sandboxing as mutually exclusive options for this very reason.