From 6c70291d0a6715c0e0392889fb55de20afc6a49d Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Tue, 4 Jan 2022 10:56:25 +0800
Subject: [PATCH 1/8] update README.md
---
README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 17f141e4..838b7349 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,14 @@
+
+
+
+RuoYi v3.3.0
+基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的微服务快速开发框架
+
+
+
+
+
+
## 平台简介
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
From f46aa17c7743dcf2a0e271b3702c26c67bc8118b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8B=A5=E4=BE=9D?=
Date: Tue, 4 Jan 2022 19:50:34 +0800
Subject: [PATCH 2/8] Create FUNDING.yml
---
.github/FUNDING.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..bcbeb1e3
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: http://doc.ruoyi.vip/ruoyi-cloud/other/donate.html # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
From 37597a85d5bbba792cf0261577e541931f5f84af Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Tue, 4 Jan 2022 20:13:22 +0800
Subject: [PATCH 3/8] update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 838b7349..827ca5d1 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
RuoYi v3.3.0
-基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的微服务快速开发框架
+基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构
From 29fac802f37d4d1da2beaa55db6a6330bb5fd580 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Tue, 4 Jan 2022 20:19:18 +0800
Subject: [PATCH 4/8] update donate
---
.github/FUNDING.yml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index bcbeb1e3..06edc15f 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,12 +1 @@
-# These are supported funding model platforms
-
-github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: http://doc.ruoyi.vip/ruoyi-cloud/other/donate.html # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+custom: http://doc.ruoyi.vip/ruoyi-cloud/other/donate.html
From 6274bfcd8cf5cbb1d803c9a39e65cd9a87ce7a37 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Tue, 4 Jan 2022 20:20:11 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=9B=BE=E7=89=87=E6=94=AF=E6=8C=81=E9=A2=84?=
=?UTF-8?q?=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/vm/vue/index-tree.vue.vm | 10 ++++++++--
.../ruoyi-gen/src/main/resources/vm/vue/index.vue.vm | 12 +++++++++---
.../src/main/resources/vm/vue/v3/index-tree.vue.vm | 12 +++++++++---
.../src/main/resources/vm/vue/v3/index.vue.vm | 10 ++++++++--
4 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index 62b12d98..adba807b 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -105,6 +105,12 @@
{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}
+#elseif($column.list && $column.htmlType == "imageUpload")
+
+
+
+
+
#elseif($column.list && "" != $column.dictType)
@@ -174,11 +180,11 @@
#elseif($column.htmlType == "imageUpload")
-
+
#elseif($column.htmlType == "fileUpload")
-
+
#elseif($column.htmlType == "editor")
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
index 1cc258e1..e7687b7b 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -133,6 +133,12 @@
{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}
+#elseif($column.list && $column.htmlType == "imageUpload")
+
+
+
+
+
#elseif($column.list && "" != $column.dictType)
@@ -195,11 +201,11 @@
#elseif($column.htmlType == "imageUpload")
-
+
#elseif($column.htmlType == "fileUpload")
-
+
#elseif($column.htmlType == "editor")
@@ -564,4 +570,4 @@ export default {
}
}
};
-
\ No newline at end of file
+
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
index 62fe2f11..059a80b6 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm
@@ -64,7 +64,7 @@
#end
#end
- 搜索
+ 搜索
重置
@@ -105,6 +105,12 @@
{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}
+#elseif($column.list && $column.htmlType == "imageUpload")
+
+
+
+
+
#elseif($column.list && "" != $column.dictType)
@@ -179,11 +185,11 @@
#elseif($column.htmlType == "imageUpload")
-
+
#elseif($column.htmlType == "fileUpload")
-
+
#elseif($column.htmlType == "editor")
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
index 6e7b41f1..1a6cb355 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm
@@ -133,6 +133,12 @@
{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}
+#elseif($column.list && $column.htmlType == "imageUpload")
+
+
+
+
+
#elseif($column.list && "" != $column.dictType)
@@ -195,11 +201,11 @@
#elseif($column.htmlType == "imageUpload")
-
+
#elseif($column.htmlType == "fileUpload")
-
+
#elseif($column.htmlType == "editor")
From cde32b45c0fa6b65056623b6a702269a44c9b582 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Wed, 5 Jan 2022 15:04:51 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=AD=97=E7=AC=A6=E4=B8=B2=E8=BF=87=E6=BB=A4?=
=?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/ruoyi/common/core/constant/Constants.java | 6 +++---
.../java/com/ruoyi/job/controller/SysJobController.java | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
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 d97ba692..e19a3ce6 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 1b5ec5dc..fd4e3dfa 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 }))
{
From c44cf9b9f6ead2feb9492bf9065e600bc4f6cd52 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Thu, 6 Jan 2022 14:58:56 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=AA=8C=E8=AF=81?=
=?UTF-8?q?=E5=8C=85=E5=90=8D=E7=99=BD=E5=90=8D=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ruoyi/common/core/constant/Constants.java | 12 ++++++++-
.../job/controller/SysJobController.java | 25 +++++++++++++------
.../com/ruoyi/job/util/ScheduleUtils.java | 24 +++++++++++++++++-
3 files changed, 51 insertions(+), 10 deletions(-)
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 e19a3ce6..82e48a68 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
@@ -27,6 +27,11 @@ public class Constants
*/
public static final String LOOKUP_LDAP = "ldap:";
+ /**
+ * LDAPS 远程方法调用
+ */
+ public static final String LOOKUP_LDAPS = "ldaps:";
+
/**
* http请求
*/
@@ -113,9 +118,14 @@ public class Constants
*/
public static final String RESOURCE_PREFIX = "/profile";
+ /**
+ * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
+ */
+ public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };
+
/**
* 定时任务违规的字符
*/
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
- "org.springframework" };
+ "org.springframework", "org.apache" };
}
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 fd4e3dfa..07cb3688 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
@@ -26,6 +26,7 @@ import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.job.domain.SysJob;
import com.ruoyi.job.service.ISysJobService;
import com.ruoyi.job.util.CronUtils;
+import com.ruoyi.job.util.ScheduleUtils;
/**
* 调度任务信息操作处理
@@ -88,20 +89,24 @@ 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))
+ else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS }))
{
- return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap:'调用");
+ return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用");
}
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS }))
{
- return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用");
+ return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用");
}
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
{
return error("新增任务'" + job.getJobName() + "'失败,目标字符串存在违规");
}
+ else if (!ScheduleUtils.whiteList(job.getInvokeTarget()))
+ {
+ return error("新增任务'" + job.getJobName() + "'失败,目标字符串不在白名单内");
+ }
job.setCreateBy(SecurityUtils.getUsername());
return toAjax(jobService.insertJob(job));
}
@@ -120,20 +125,24 @@ 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))
+ else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS }))
{
- return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap:'调用");
+ return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用");
}
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS }))
{
- return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用");
+ return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用");
}
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
{
return error("修改任务'" + job.getJobName() + "'失败,目标字符串存在违规");
}
+ else if (!ScheduleUtils.whiteList(job.getInvokeTarget()))
+ {
+ return error("修改任务'" + job.getJobName() + "'失败,目标字符串不在白名单内");
+ }
job.setUpdateBy(SecurityUtils.getUsername());
return toAjax(jobService.updateJob(job));
}
diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/ScheduleUtils.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/ScheduleUtils.java
index 7e7657fe..1ffd12da 100644
--- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/ScheduleUtils.java
+++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/util/ScheduleUtils.java
@@ -10,9 +10,11 @@ import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.TriggerBuilder;
import org.quartz.TriggerKey;
+import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.constant.ScheduleConstants;
import com.ruoyi.common.core.exception.job.TaskException;
import com.ruoyi.common.core.exception.job.TaskException.Code;
+import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.job.domain.SysJob;
/**
@@ -110,4 +112,24 @@ public class ScheduleUtils
+ "' cannot be used in cron schedule tasks", Code.CONFIG_ERROR);
}
}
-}
\ No newline at end of file
+
+ /**
+ * 检查包名是否为白名单配置
+ *
+ * @param invokeTarget 目标字符串
+ * @return 结果
+ */
+ public static boolean whiteList(String invokeTarget)
+ {
+ String packageName = StringUtils.substringBefore(invokeTarget, ")");
+ int count = StringUtils.countMatches(packageName, ".");
+ if (count > 1)
+ {
+ if (!StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+}
From ca5d3e355646da012b9123a7dcd59a414633d290 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Fri, 7 Jan 2022 13:17:06 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=81=97=E6=BC=8F?=
=?UTF-8?q?=E7=9A=84=E5=88=86=E9=A1=B5=E5=8F=82=E6=95=B0=E5=90=88=E7=90=86?=
=?UTF-8?q?=E5=8C=96=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/ruoyi/common/core/utils/PageUtils.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java
index f93d1f84..59ad3248 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/PageUtils.java
@@ -23,7 +23,8 @@ public class PageUtils extends PageHelper
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
- PageHelper.startPage(pageNum, pageSize, orderBy);
+ Boolean reasonable = pageDomain.getReasonable();
+ PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
}
}
}