This is an automated email from the ASF dual-hosted git repository.
liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new d233ab4d45 fix: fix vulnerability (#6099)
d233ab4d45 is described below
commit d233ab4d451c8b5c3be685d83d213d1573c92cb2
Author: aias00 <[email protected]>
AuthorDate: Thu Aug 14 20:42:23 2025 +0800
fix: fix vulnerability (#6099)
---
.../src/main/java/org/apache/shenyu/common/utils/JsonUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/JsonUtils.java
b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/JsonUtils.java
index 6edbad7e61..391ae6b698 100644
--- a/shenyu-common/src/main/java/org/apache/shenyu/common/utils/JsonUtils.java
+++ b/shenyu-common/src/main/java/org/apache/shenyu/common/utils/JsonUtils.java
@@ -90,7 +90,7 @@ public final class JsonUtils {
try {
return MAPPER.writeValueAsString(object);
} catch (IOException e) {
- LOG.warn("write to json string error: {}", object, e);
+ LOG.warn("Failed to serialize object of type: {}",
object.getClass().getSimpleName(), e);
return Constants.EMPTY_JSON;
}
}
@@ -107,7 +107,7 @@ public final class JsonUtils {
final MapType mapType =
MAPPER.getTypeFactory().constructMapType(LinkedHashMap.class, String.class,
Object.class);
return MAPPER.readValue(json, mapType);
} catch (IOException e) {
- LOG.warn("write to map error: {}", object, e);
+ LOG.warn("Failed to serialize object of type: {}",
object.getClass().getSimpleName(), e);
return new LinkedHashMap<>();
}
}