A possible Bug? cfdump with an output="false" attribute

I had a bug in my code for a long time. The exact code (simplified) is as follows

<cfset testvar = "testing000000">
<cfdump var="#testvar#" output="false">

I found this issue because I noticed a file:

C:\lucee\tomcat\lucee-server\context\library\tag\false

Which had grown to over 19 GB in size.

Upon research it led me to this cfdump that was dumping the data to this “false” file. Which I meant to put “expand=false” on, not output=false.

Checking Lucee documentation:

“false: output will not be written, effectively disabling the dump.”

But instead of disabling the dump, it is writing it to disk.

Not a big deal to me, but I thought I would make note of it as it acts and feels like a bug. Perhaps not though?

And, I can output to false.txt or my-test-output.txt which is nice, but this does not work the way the documentation says it will.

If it were me either one of two things would happen here:

1.) If outputting to the filesystem… why is it doing it in the tag directory? That seems buggy
2.) If the documentation is to be true, the code should change on how it works.
3.) More likely this is a feature and nice, but then the documentation would be updated. (and possibly the default location of the output file would change)

Verified it works the same way with Lucee 6.1.0.243 and Lucee 5.2.8.50 both running on Windows.

Yikes, there’s a quite a disconnect between the docs and the behaviour there!

fix is a one liner to test for false here, avoiding even producing the dump, plus updating the documentation to reflect the support for logging to a file via output

Docs updated

https://luceeserver.atlassian.net/browse/LDEV-5586

fixed in 6.2.2.10-SNAPSHOT

2 Likes