[ColdBox 3.8.1] Unable to Turn Off Debugmode

Since upgrading to 3.8.1 I am unable to turn off debug mode in my dev environment. I read the post about the new requirement for debugPassword reinitPassword and I made sure to set those in my test environment settings:

coldbox.debugPassword = “”;
coldbox.reinitPassword = “”;

And I restarted the Railo engine to make sure those changes were picked up. I also tried setting these values to empty strings in my production settings.

In all cases, when I load debugmode=false, the debug goes away for a single request, then comes back on the next request.

Any ideas? Not a huge deal, but I like to be able to shut it off occasionally.

Brad, any ideas?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

I’m looking at the DebuggerService and I’m wondering if it has to do with the cookies set in setDebugMode(). Around lines 174:

First off, not sure why turning debug on uses getCookieName() vs. instance.cookieName when turning off. Secondly, when you are turning debug off, it also expires the cookie immediately, which I think is the problem. Once the cookie is gone, the framework goes back to the coldbox.debugMode setting. I think you want to just set the value of the cookie to disabled, but not expire it.

Yeah, it’s a combination of that cookie being removed and the change to getDebugMode() made in Brad’s commit here:

getDebugMode() used to always return false when the cookie did not exist. Now it returns the debugMode setting. I understand why, but the cookie needs to not expire when disabling to support this.

Pull request submitted:

This was just an oversight in our recent security enhancements to debug mode. I tested using the URL params to turn ON debug mode when the master setting was off, but must not have tested the other way around.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks for the pull.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com