RE: [coldbox:16833] Re: [coldbox 3.5.3] GetPlugin("CookieStorage") wrapping values in quotes

I just ran a quick test and it works find for me.

<cfset cs = getPlugin(“CookieStorage”)>
<cfset cs.setVar(“foo”,958)>
<cfdump var="#cs.getVar(“foo”)#">

The value in the cookie scope is JSON encoded and wrapped in quotes, but when I retrieve the value with the getVar(), the value is properly decoded back to 958 without the quotes.

I can only assume that you’re trying to access the cookie scope directly which is not recommended. If you use the CookieStorage plugin, you should use it for all interaction, otherwise you are exposing your code to its internal implementations (including encryption). More specifically, ColdBox used to use a different JSON encoding mechanism which didn’t quote numbers. Now it uses CF’s built-in serializeJSON() which does wrap number in quotes.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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