This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch test-4
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/test-4 by this push:
     new e3a715d3d03 Update ClusterConfigTaskExecutor.java
e3a715d3d03 is described below

commit e3a715d3d03ae002a0a7e8372cfa48d1d7c4f255
Author: Steve Yurong Su <[email protected]>
AuthorDate: Fri Jun 20 15:10:49 2025 +0800

    Update ClusterConfigTaskExecutor.java
---
 .../config/executor/ClusterConfigTaskExecutor.java      | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 0643f5637ba..a1e13c36ff7 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -622,9 +622,10 @@ public class ClusterConfigTaskExecutor implements 
IConfigTaskExecutor {
         new UDFClassLoader(libRoot) {
           @Override
           public Class<?> loadClass(String name, boolean resolve) throws 
ClassNotFoundException {
+            LOGGER.info("Loading class [{}]", name);
             // Prevent UDF from accessing restricted classes
             // Using Process or File in UDF is not allowed
-            if (name.startsWith("java.lang.Process") || 
name.startsWith("java.io.File")) {
+            if (name.startsWith("java.lang.System")) {
               LOGGER.warn(
                   "SANDBOX: UDF {} class {} is trying to access restricted 
class, which is not allowed",
                   createFunctionStatement.getUdfName(),
@@ -655,20 +656,10 @@ public class ClusterConfigTaskExecutor implements 
IConfigTaskExecutor {
                               e.getMessage())))
               .orElse(RpcUtils.SUCCESS_STATUS);
       if (maybeValidationFailed.getCode() != 
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
-        LOGGER.warn(
-            "Failed to validate UDF class [{}] for function [{}] in sandbox, 
reason: {}",
-            createFunctionStatement.getClassName(),
-            createFunctionStatement.getUdfName(),
-            maybeValidationFailed.getMessage());
+        LOGGER.warn(maybeValidationFailed.getMessage());
         future.setException(
             new IoTDBException(
-                "Failed to validate UDF class '"
-                    + createFunctionStatement.getClassName()
-                    + "' for function '"
-                    + createFunctionStatement.getUdfName()
-                    + "', reason: "
-                    + maybeValidationFailed.getMessage(),
-                maybeValidationFailed.getCode()));
+                maybeValidationFailed.getMessage(), 
maybeValidationFailed.getCode()));
         return Optional.of(future);
       }
     } catch (Exception e) {

Reply via email to