From e999360da80c068317f59aea1f6bfc98afd1adba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=93=81=E7=94=B2=E5=B0=8F=E5=AE=9D?= <2922035952@qq.com> Date: Mon, 16 Dec 2024 00:16:29 +0800 Subject: [PATCH] modified:add a small change. (#2878) --- .../collector/collect/database/JdbcCommonCollect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/database/JdbcCommonCollect.java b/hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/database/JdbcCommonCollect.java index c89020e876a..b602d2cdcf8 100644 --- a/hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/database/JdbcCommonCollect.java +++ b/hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/database/JdbcCommonCollect.java @@ -296,7 +296,8 @@ private String constructDatabaseUrl(JdbcProtocol jdbcProtocol) { // check whether the parameter is valid if (url.contains("create trigger") || url.contains("create alias") || url.contains("runscript from") || url.contains("allowloadlocalinfile") || url.contains("allowloadlocalinfileinpath") - || url.contains("uselocalinfile")) { + || url.contains("uselocalinfile") || url.contains("autodeserialize") || url.contains("detectcustomcollations") + || url.contains("serverstatusdiffinterceptor")) { throw new IllegalArgumentException("Invalid JDBC URL: contains malicious characters."); } // when has config jdbc url, use it