JSONPrettyPrint Form Params Throws Exception

Description

I stumbled upon this issue while debugging an app where I’m introducing Quick ORM. When the system generates an exception related to Quick, I can see the normal exception appear on screen, but the /cbdebugger route shows an exception related to cbdebugger, “invalid syntax in named argument”.

It looks like the problem is in the JSONPrettyPrint.cfc:
return variables[ getDefaultPrinter() ].formatJson( argumentCollection = arguments );
FormatJSON is trying to work with the following data, which does not appear to be valid JSON:

{{"id":"2933d686-92a9-4760-b2ba-4d3d8f46e331","isVisualizer":true}={}, fieldnames={{"id":"2933d686-92a9-4760-b2ba-4d3d8f46e331","isVisualizer":true}}}

I was able to output the bad JSON by changing line 57 to:

Here’s the stack trace of the problem:

Activity

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created April 28, 2022 at 5:28 PM
Updated May 2, 2022 at 8:51 PM
Resolved May 2, 2022 at 8:51 PM