Fix: Escape single quote when masking string

This commit is contained in:
Lars Simon Winzer
2026-03-24 13:40:34 +01:00
parent a281f74789
commit d0b431b650
@@ -49,8 +49,9 @@ public class ResponseEncoder {
} }
private static String maskIfNeeded(String value) { private static String maskIfNeeded(String value) {
if (value.contains(" ")) { if (value.contains(" ") || value.contains("'")) {
return "'" + value + "'"; String escaped = value.replace("'", "\\'");
return "'" + escaped + "'";
} }
return value; return value;
} }