[coldbox-3.5.0-Jeremiah] cookieStorage setVar simple value of string

If I do this my cookie ends up with this value. %22value%22 sort of a pain to deal with in Javascript when I pull the value.

Is that correct or am I missing something?

Line 88 seems to be the issue in CookieStorage.cfc, if I wax the json.encode it gets rid of the double quotes.

On a side note, for security reasons I would not store anything legible in the cookie for identifying the user. For example I would be more inclined to create a GUID or something that else that would not identify it as a user.

For more information on the dangers please read


Thanks Andrew, I’ll have a look. At this point I’m just playing with a Coldbox/Backbone app with a login of course and the cookie just displays the username in the input if it’s present. It’s something I’d probably just drop from the functionality if I ever go live with it. If I use the GUID I’d probably have to use Ajax to get the username or encrypt the username. Just as a side note I’m using the module https://github.com/cfaddict/solitary**.**


I’ve not spent the time to search the code, but, was wondering how my cookies kept getting single quotes. One of those luxury quests for me because it never broke anything in the app, but, I knew something was odd.