To see details for this component you need to enable debug output

Calling a cfc directly (has functions with access=remote) gives this message.

It would be great if we could have the option to remove the message entirely or maybe edit it to something else.

Thanks.

PS because I don’t want to give away to hackers what language I’m using (Googling this shows I’m using CFML) I would like to show a nice friendly 404 message instead!

You can configure which template is used via server.xml

component-dump.cfm is just the following

<cfif isDebugMode()>
    <cfdump var="#component#">
<cfelse>
    To see details for this component you need to enable debug output
</cfif>

Thank you!

I’m using Tomcat and I found 2 component-dumps:
/usr/local/tomcat/webapps/ROOT/WEB-INF/lucee/context/component-dump.cfm
and
/var/www/vhosts/***********/www/WEB-INF/lucee/context/component-dump.cfm

Changing the first had no effect, but the second (www/WEB-INF) did:

<cfif isDebugMode()>
	<cfdump var="#component#">
<cfelse>
	
<!--- To see details for this component you need to enable debug output --->

<cfheader statuscode="404" statustext="Not found">

</cfif>

Now I have a 404 message if someone tries to navigate to my cfc, which is exactly what I wanted,
Thanks again for your help…

1 Like