@@ -1562,7 +1562,10 @@ common.returnRaw = function(params, returnCode, body, heads) {
15621562 else {
15631563 console . error ( "Output already closed, can't write more" ) ;
15641564 console . trace ( ) ;
1565- console . log ( params ) ;
1565+ // Don't dump the full params object — req.body/req.headers can
1566+ // contain credentials, session cookies, or other secrets. Log
1567+ // only the pathname (query string can carry api_key/auth_token).
1568+ console . log ( { pathname : params . urlParts && params . urlParts . pathname , apiPath : params . apiPath , qstringKeys : params . qstring && Object . keys ( params . qstring ) } ) ;
15661569 }
15671570 }
15681571} ;
@@ -1625,7 +1628,10 @@ common.returnMessage = function(params, returnCode, message, heads, noResult = f
16251628 else {
16261629 console . error ( "Output already closed, can't write more" ) ;
16271630 console . trace ( ) ;
1628- console . log ( params ) ;
1631+ // Don't dump the full params object — req.body/req.headers can
1632+ // contain credentials, session cookies, or other secrets. Log
1633+ // only the pathname (query string can carry api_key/auth_token).
1634+ console . log ( { pathname : params . urlParts && params . urlParts . pathname , apiPath : params . apiPath , qstringKeys : params . qstring && Object . keys ( params . qstring ) } ) ;
16291635 }
16301636 }
16311637} ;
@@ -1703,7 +1709,10 @@ common.returnOutput = function(params, output, noescape, heads) {
17031709 else {
17041710 console . error ( "Output already closed, can't write more" ) ;
17051711 console . trace ( ) ;
1706- console . log ( params ) ;
1712+ // Don't dump the full params object — req.body/req.headers can
1713+ // contain credentials, session cookies, or other secrets. Log
1714+ // only the pathname (query string can carry api_key/auth_token).
1715+ console . log ( { pathname : params . urlParts && params . urlParts . pathname , apiPath : params . apiPath , qstringKeys : params . qstring && Object . keys ( params . qstring ) } ) ;
17071716 }
17081717 }
17091718} ;
0 commit comments