diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java index d97ba69..e19a3ce 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java @@ -20,12 +20,12 @@ 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:"; /** * http请求 @@ -117,5 +117,5 @@ public class Constants * 定时任务违规的字符 */ public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", - "org.springframework.jndi" }; + "org.springframework" }; } diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/controller/SysJobController.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/controller/SysJobController.java index 1b5ec5d..fd4e3df 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/controller/SysJobController.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/controller/SysJobController.java @@ -88,11 +88,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 })) { @@ -120,11 +120,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 })) {