Skip to content

Commit bb16623

Browse files
author
‘niuerzhuang’
committed
fix: dubbo hook
1 parent 75dab62 commit bb16623

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dongtai-core/src/main/java/io/dongtai/iast/core/handler/hookpoint/controller/impl/DubboImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public static void collectDubboRequestSource(Object handler, Object invocation,
101101
return;
102102
}
103103

104-
String url = (String) requestMeta.get("requestURL") + "/" + methodName;
105-
String uri = (String) requestMeta.get("requestURI") + "/" + methodName;
104+
String url =requestMeta.get("requestURL").toString() + "/" + methodName;
105+
String uri =requestMeta.get("requestURI").toString() + "/" + methodName;
106106

107107
StringBuilder argSign = new StringBuilder("(");
108108
if (argumentTypes != null && argumentTypes.length > 0) {
@@ -200,7 +200,7 @@ public static void collectDubboResponse(Object result, byte status) {
200200

201201
try {
202202
EngineManager.REQUEST_CONTEXT.get().put("responseStatus",
203-
(String) EngineManager.REQUEST_CONTEXT.get().get("protocol") + " " + status);
203+
EngineManager.REQUEST_CONTEXT.get().get("protocol").toString() + " " + status);
204204
ByteArrayOutputStream buff = EngineManager.BODY_BUFFER.getResponse();
205205
buff.write(result.toString().getBytes());
206206
} catch (Throwable ignore) {

dongtai-core/src/main/java/io/dongtai/iast/core/utils/TaintPoolUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static void trackObject(MethodEvent event, PolicyNode policyNode, Object
153153
hash = System.identityHashCode(obj);
154154
identityHash = hash;
155155
}
156-
if (EngineManager.TAINT_HASH_CODES.contains(hash)) {
156+
if (EngineManager.TAINT_HASH_CODES.contains(hash) && !isMicroservice) {
157157
return;
158158
}
159159
}

0 commit comments

Comments
 (0)