jomarko commented on code in PR #3343:
URL:
https://github.com/apache/incubator-kie-tools/pull/3343#discussion_r2511219091
##########
packages/cors-proxy/src/proxy/ExpressCorsProxy.ts:
##########
@@ -231,6 +231,19 @@ class Logger {
console.debug(message, arg ?? "");
}
+ /**
+ * This is used when some very basic user input sanitization is needed
before it is posted in the logs,
+ * to avoid completely uncontrolled logging of user input.
+ * @param message
+ * @param arg
+ */
+ public debugEscapeNewLines(message: string, arg?: any) {
+ if (!this.verbose) {
+ return;
+ }
+ return console.debug(message.replace(/\r?\n|\r/g, "_"), arg ?? "");
Review Comment:
```suggestion
console.debug(message.replace(/\r?\n|\r/g, "_"), arg ?? "");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]