trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

xdebug: probe-full-json fix single quote escapes

Open bneradt opened this issue 1 month ago • 0 comments

The xdebug plugin was incorrectly escaping single quotes as ' in probe-full-json output, which is not a valid JSON escape sequence and broke JSON parsing for headers like Content-Security-Policy that contain CSP directives with single quotes (e.g., 'self', 'unsafe-inline'). This fix modifies the EscapeCharForJson class to only escape single quotes in legacy probe format (which uses single-quoted strings) while leaving them unescaped in full JSON mode, producing RFC 8259-compliant JSON output that can be piped directly to tools like jq.

bneradt avatar Dec 09 '25 23:12 bneradt