In the application I designed, I named one of my web pages "error.cfm". I want it to display whenever there is an error from the application. So I put the following code inside "error.cfm":
An uncaught exception just 'happened' :-(
<br><br>
<b><cfoutput>#exception.message#</cfoutput></b><br />
<cfoutput>#exception.detail#</cfoutput><br /><br />
<cfif isdefined('exception.cause')>
<b><cfoutput>#exception.cause.message#</cfoutput></b><br />
<cfoutput>#exception.cause.detail#</cfoutput>
</cfif>
<cfdump var="#exception#">
So after hosting the website, I discovered that this particular page refused to load and instead a '500 Internal Error' was displayed. I then complained to my hosting company and I was sent these details:
Dear Customer,
The actual error message is the following:
Security: The requested template has been denied access to createobject(java).
The following is the internal exception message: access denied (coldfusion.runtime.FunctionPermission createobject(java))The error occurred in C:\inetpub\vhosts\plat4ad.com\httpdocs\cms\error.cfm: line 10
8 : 9 : 10 :
Unfortunately some tags and functions are disabled on our servers due to security purposes. You can check full list here:
https://support.dailyrazor.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=293&nav=0,29,76
Please let us know if you have any other questions.
Best wishes, Support-GG DailyRazor Support Team.
Now checking the lists of the tags they disabled on their servers, CFDUMP
was among them:
On the shared ColdFusion servers you will have access to all tags and functions except for the following:
CF Tags:
- CFCOLLECTION
- CFCONTENT
- CFDUMP
- CFEXECUTE
- CFLOG
- CFOBJECT
- CFOBJECTCACHE
- CFREGISTRY
CF Functions:
- SetProfileString
- CreateObject(COM)
- CreateObject(CORBA)
- CreateObject(JAVA)
Please is there any alternative for CFDUMP
? Or does anyone know any ColdFusion hosting company that doesn't have these restrictions? I appreciate any ideas from you.
I will add that if you choose to "dump" details, you can also wrap the dump code in an "if" block that looks at your cgi.REMOTE_ADDR and if it matches your IP address, does the dumpout, otherwise doesn't.
Caveats: YMMV, have to have a static IP, have to BE at that IP, etc.