tracker issue : CF-3040329

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 80423:(Watson Migration Closure)SerializeJSON function should have an argument to toggle the securejson prefix in cases where it is not needed

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/

Reporter/Name(from Bugbase): Peter Freitag / Peter Freitag (Peter Freitag)

Created: 10/20/2009

Components: AJAX, Plumbing

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Minor / Unknown

Locale/System: English / Platforms All

Vote Count: 8

Problem:

SerializeJSON function should have an argument to toggle the securejson prefix in cases where it is not needed. 
Method:


Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3040329

External Customer Info:
External Company:  
External Customer Name: Peter Freitag
External Customer Email: 735D4A6E43D50B6B992016B8
External Test Config: 10/20/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
22637 | November 11, 2011 12:41:28 AM GMT
This bug has been voted..
Vote by External U.
22638 | November 11, 2011 12:41:29 AM GMT
This bug has been voted..
Vote by External U.
22639 | November 11, 2011 12:41:30 AM GMT
This bug has been voted..
Vote by External U.
22640 | November 11, 2011 12:41:31 AM GMT
+1 - this can be a gotcha. I've added a comment to the CF9 SerializeJSON doc: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79fa.html
Vote by External U.
22641 | November 11, 2011 12:41:32 AM GMT
Adobe, Can you please reconsider? It's been 6.5 years now. Suggestion (new "useSecureJSONPrefix" parameter): Syntax: -------------------------------------------- SerializeJSON(var[, serializeQueryByColumns[, useCustomSerializer[, useSecureJSONPrefix]]]) -------------------------------------------- Description: -------------------------------------------- Whether to prepend the Secure JSON Prefix or not. The default value is true. -------------------------------------------- Thanks!, -Aaron
Comment by External U.
22634 | April 20, 2016 12:23:07 AM GMT
Man, this issue is a pain in the butt for library authors who want to build an interface using JSON since it many users will report it doesn't work only to find they have the JSON prefix enabled. Just dealing with this again in ContentBox CMS. There's no good way to detect if this setting is on or if a custom prefix has been set to strip it out so it makes serializeJSON() unreliable to use.
Comment by External U.
22635 | August 01, 2016 09:41:53 AM GMT
Hi Adobe, This ticket can be marked Closed/Fixed (this ticket was fixed in CF11), per the comment I just posted in Slack: ----------- That was fixed in CF11, but we didn't know b/c the docs weren't updated correctly. The docs said CF11 added `useCustomSerializer` as `SerializeJSON`'s 3rd parameter. Then, after CF2016 Update 3, the docs said CF2016 Update 3 inserted `useSecureJSONPrefix` as the 3rd parameter (making `useCustomSerializer` the 4th parameter instead of 3rd). In actuality, CF11 added both parameters (`useSecureJSONPrefix` as the 3rd and `useCustomSerializer` as the 4th). I filed https://bugbase.adobe.com/index.cfm?event=bug&id=4197185 to fix that doc issue, and it was fixed. It does seem odd, tho, to have to specify `serializeQueryByColumns` when serializing a non-query. Maybe Adobe will update all the built-in functions to accept named arguments, so that we don't have to pass meaningless parameters. But, then that may have the side-effect of making the semicolon optional in script (as recently observed by @adam_cameron). But anyhow, there's the history on that, FWIW! ( ----------- Thanks!, -Aaron
Comment by Aaron N.
22636 | January 21, 2017 07:50:09 PM GMT