From 578d65dfb4c07bd75aa5a6d2f46fc63fa5701fc3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Jan 2022 14:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=AD=97=E7=AC=A6=E4=B8=B2=E8=BF=87=E6=BB=A4=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/constant/Constants.java | 6 +++--- .../com/ruoyi/quartz/controller/SysJobController.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java index 9e770c812..926c8fc59 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java @@ -142,16 +142,16 @@ public class Constants /** * RMI 远程方法调用 */ - public static final String LOOKUP_RMI = "rmi://"; + public static final String LOOKUP_RMI = "rmi:"; /** * LDAP 远程方法调用 */ - public static final String LOOKUP_LDAP = "ldap://"; + public static final String LOOKUP_LDAP = "ldap:"; /** * 定时任务违规的字符 */ public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", - "org.springframework.jndi" }; + "org.springframework" }; } \ No newline at end of file diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java index 2512bf16f..56857e0f9 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java @@ -87,11 +87,11 @@ public class SysJobController extends BaseController } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) { - return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi://'调用"); + return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_LDAP)) { - return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap://'调用"); + return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) { @@ -119,11 +119,11 @@ public class SysJobController extends BaseController } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) { - return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi://'调用"); + return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_LDAP)) { - return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap://'调用"); + return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) {