From dbc633d92b6c8c35922234611d698d3cb0a1a234 Mon Sep 17 00:00:00 2001 From: Ji Juntao Date: Thu, 19 Oct 2023 14:12:33 +0800 Subject: [PATCH] Check the input yaml and the path in ACL (#7475) * check the input yaml and the path. * only modify the path, no yaml. * remove useless import --- .../org/apache/rocketmq/acl/plain/PlainPermissionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java b/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java index f6699fa13bc..345aed06c5a 100644 --- a/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java +++ b/acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java @@ -484,7 +484,7 @@ public boolean updateGlobalWhiteAddrsConfig(List globalWhiteAddrsList, S return false; } - if (!fileName.startsWith(fileHome)) { + if (!file.getAbsolutePath().startsWith(fileHome)) { log.error("Parameter value " + fileName + " is not in the directory rocketmq.home.dir " + fileHome); return false; }