From 91452fdd931749298a0972cca3fbe9cf5688224e Mon Sep 17 00:00:00 2001 From: thinkgem Date: Mon, 27 Jul 2020 17:52:27 +0800 Subject: [PATCH 01/11] 4.2.1 --- common/pom.xml | 2 +- modules/core/pom.xml | 2 +- modules/template/pom.xml | 2 +- parent/pom.xml | 2 +- root/pom.xml | 2 +- web/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index 4f7549b4..376cc390 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -6,7 +6,7 @@ com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT ../parent/pom.xml diff --git a/modules/core/pom.xml b/modules/core/pom.xml index cbb477b3..2a7f870d 100644 --- a/modules/core/pom.xml +++ b/modules/core/pom.xml @@ -6,7 +6,7 @@ com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT ../../parent/pom.xml diff --git a/modules/template/pom.xml b/modules/template/pom.xml index a4032723..f04c1962 100644 --- a/modules/template/pom.xml +++ b/modules/template/pom.xml @@ -6,7 +6,7 @@ com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT ../../parent/pom.xml diff --git a/parent/pom.xml b/parent/pom.xml index f4071b25..c58c880e 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -11,7 +11,7 @@ com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT pom JeeSite Parent diff --git a/root/pom.xml b/root/pom.xml index 8e7b7412..0a71acdc 100644 --- a/root/pom.xml +++ b/root/pom.xml @@ -5,7 +5,7 @@ com.jeesite jeesite-root - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT pom JeeSite diff --git a/web/pom.xml b/web/pom.xml index 54b7ec9e..93bcdd01 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -6,7 +6,7 @@ com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT ../parent/pom.xml From d9c3b036f3431555825081d19f60400bb39107db Mon Sep 17 00:00:00 2001 From: thinkgem Date: Mon, 27 Jul 2020 19:14:39 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20laydate.js=20?= =?UTF-8?q?=E7=9A=84=20done=20=E4=BA=8B=E4=BB=B6=EF=BC=8C=E5=BD=93?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E4=B8=AA=E6=97=A5=E6=9C=9F=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E5=89=8D=EF=BC=8C=E5=8F=AF=E8=83=BD=E4=B8=8A=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=BF=98=E6=9C=AA=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=8D=E4=B8=8A=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/resources/static/laydate/5.0/laydate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/resources/static/laydate/5.0/laydate.js b/common/src/main/resources/static/laydate/5.0/laydate.js index 414a890a..60a90a20 100644 --- a/common/src/main/resources/static/laydate/5.0/laydate.js +++ b/common/src/main/resources/static/laydate/5.0/laydate.js @@ -1647,8 +1647,8 @@ } else { if(lay(btn).hasClass(DISABLED)) return that.hint('不在有效日期或时间范围内'); } - that.done(); that.setValue(that.parse()).remove() + that.done(); } }; active[type] && active[type](); From 38ee55bd38ddc39d9fe5ddc7838b1158d6d5223e Mon Sep 17 00:00:00 2001 From: thinkgem Date: Mon, 27 Jul 2020 23:36:29 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=96=B0=E5=A2=9E=E8=BF=911=E5=91=A8?= =?UTF-8?q?=EF=BC=8C=E8=BF=91n=E5=A4=A9=E5=8F=82=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/views/modules/sys/logList.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/resources/views/modules/sys/logList.html b/modules/core/src/main/resources/views/modules/sys/logList.html index a19b8261..d66092f2 100644 --- a/modules/core/src/main/resources/views/modules/sys/logList.html +++ b/modules/core/src/main/resources/views/modules/sys/logList.html @@ -67,10 +67,12 @@
From a4ca4aeb18ccbf1fe654fa9dba2db37acf250186 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Wed, 29 Jul 2020 17:56:48 +0800 Subject: [PATCH 04/11] =?UTF-8?q?Tab=E9=A1=B5=E7=AD=BE=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=EF=BC=9BGrid=E5=88=97?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=EF=BC=9B?= =?UTF-8?q?Grid=E5=88=97=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E9=9A=90?= =?UTF-8?q?=E8=97=8F=EF=BC=9B=E8=A1=A8=E5=A4=B4=E4=B8=8B=E6=94=BE=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=B7=A5=E5=85=B7=E6=9D=A1=E6=BC=94=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jeesite/common/collect/ListUtils.java | 21 +++++++++++++++++++ .../i18n/core/common_view/i18n_en.properties | 1 + .../core/common_view/i18n_ja_JP.properties | 1 + .../templates/modules/gen/crud/viewList.xml | 1 + .../templates/modules/gen/query/viewList.xml | 1 + .../main/resources/views/include/jslibs.html | 4 +++- .../views/modules/msg/msgInnerList.html | 1 + .../resources/views/modules/sys/areaList.html | 1 + .../views/modules/sys/companyList.html | 1 + .../resources/views/modules/sys/logList.html | 3 ++- .../views/modules/sys/officeList.html | 1 + .../views/modules/sys/onlineList.html | 1 + .../resources/views/modules/sys/postList.html | 1 + .../views/modules/sys/user/corpAdminList.html | 1 + .../views/modules/sys/user/empUserList.html | 3 ++- .../views/modules/sys/user/secAdminList.html | 1 + .../views/modules/test/testDataList.html | 11 +++++++++- 17 files changed, 50 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/jeesite/common/collect/ListUtils.java b/common/src/main/java/com/jeesite/common/collect/ListUtils.java index 0e7080cb..c601d137 100644 --- a/common/src/main/java/com/jeesite/common/collect/ListUtils.java +++ b/common/src/main/java/com/jeesite/common/collect/ListUtils.java @@ -46,6 +46,27 @@ public class ListUtils extends org.apache.commons.collections.ListUtils { return false; } + /** + * 是否包含字符串 + * @param strs 验证字符串组 + * @param strs2 字符串组 + * @return 包含返回true + */ + public static boolean inString(List strs, List strs2){ + if (strs != null && strs2 != null){ + for (String s : strs){ + if (s != null) { + for (String s2 : strs2){ + if (StringUtils.trim(s).equals(StringUtils.trim(s2))){ + return true; + } + } + } + } + } + return false; + } + public static ArrayList newArrayList() { return new ArrayList(); } diff --git a/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties b/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties index 0db3d027..8123bbcf 100644 --- a/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties +++ b/modules/core/src/main/resources/i18n/core/common_view/i18n_en.properties @@ -20,6 +20,7 @@ 操作=Actions 更多=More 更多操作=More action +设置=Setting 基本信息=Basic information 详细信息=Detail information diff --git a/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties b/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties index ce276568..c0ff8db6 100644 --- a/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties +++ b/modules/core/src/main/resources/i18n/core/common_view/i18n_ja_JP.properties @@ -20,6 +20,7 @@ 操作=操作 更多=さらに多 更多操作=他の操作 +设置=設置 基本信息=基本情報 详细信息=詳細情報 diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml index f3d969ee..324ad7eb 100644 --- a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml +++ b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml @@ -22,6 +22,7 @@ \<% if(hasPermi('${permissionPrefix}:edit')){ %> \${text('新增')} \<% } %> +
diff --git a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml index 0bee5603..a1226315 100644 --- a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml +++ b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml @@ -19,6 +19,7 @@ \${text('展开')} \${text('折叠')} <% } %> +
diff --git a/modules/core/src/main/resources/views/include/jslibs.html b/modules/core/src/main/resources/views/include/jslibs.html index 79522054..ca0496eb 100644 --- a/modules/core/src/main/resources/views/include/jslibs.html +++ b/modules/core/src/main/resources/views/include/jslibs.html @@ -7,6 +7,9 @@ <% if (@ListUtils.inString('zTree', libs!)){ %> <% } %> +<% if (@ListUtils.inString(['tabPage', 'dataGrid', 'fileupload'], libs!)){ %> + +<% } %> <% if (@ListUtils.inString('tabPage', libs!)){ %> @@ -34,7 +37,6 @@ - <% } %> <% if (@ListUtils.inString('ueditor', libs!)){ %> diff --git a/modules/core/src/main/resources/views/modules/msg/msgInnerList.html b/modules/core/src/main/resources/views/modules/msg/msgInnerList.html index 494668af..e6ac4681 100644 --- a/modules/core/src/main/resources/views/modules/msg/msgInnerList.html +++ b/modules/core/src/main/resources/views/modules/msg/msgInnerList.html @@ -10,6 +10,7 @@ <% if(hasPermi('msg:msgInner:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/areaList.html b/modules/core/src/main/resources/views/modules/sys/areaList.html index d43e2f83..6a76d9b9 100644 --- a/modules/core/src/main/resources/views/modules/sys/areaList.html +++ b/modules/core/src/main/resources/views/modules/sys/areaList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:area:edit')){ %> 新增 <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/companyList.html b/modules/core/src/main/resources/views/modules/sys/companyList.html index 27f70d1f..5482534c 100644 --- a/modules/core/src/main/resources/views/modules/sys/companyList.html +++ b/modules/core/src/main/resources/views/modules/sys/companyList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:company:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/logList.html b/modules/core/src/main/resources/views/modules/sys/logList.html index d66092f2..46d01a02 100644 --- a/modules/core/src/main/resources/views/modules/sys/logList.html +++ b/modules/core/src/main/resources/views/modules/sys/logList.html @@ -6,7 +6,8 @@ 访问日志
diff --git a/modules/core/src/main/resources/views/modules/sys/officeList.html b/modules/core/src/main/resources/views/modules/sys/officeList.html index 2890365f..699a61e7 100644 --- a/modules/core/src/main/resources/views/modules/sys/officeList.html +++ b/modules/core/src/main/resources/views/modules/sys/officeList.html @@ -13,6 +13,7 @@ <% if(hasPermi('sys:office:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/onlineList.html b/modules/core/src/main/resources/views/modules/sys/onlineList.html index 99b5813b..10c381e8 100644 --- a/modules/core/src/main/resources/views/modules/sys/onlineList.html +++ b/modules/core/src/main/resources/views/modules/sys/onlineList.html @@ -7,6 +7,7 @@
diff --git a/modules/core/src/main/resources/views/modules/sys/postList.html b/modules/core/src/main/resources/views/modules/sys/postList.html index c026671e..4cecd950 100644 --- a/modules/core/src/main/resources/views/modules/sys/postList.html +++ b/modules/core/src/main/resources/views/modules/sys/postList.html @@ -10,6 +10,7 @@ <% if(hasPermi('sys:post:edit')){ %> ${text('新增')} <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html b/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html index 10881915..5681d442 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/corpAdminList.html @@ -14,6 +14,7 @@ ${text('新增管理员')} <% } %> <% } %> +
diff --git a/modules/core/src/main/resources/views/modules/sys/user/empUserList.html b/modules/core/src/main/resources/views/modules/sys/user/empUserList.html index 2cc9c31d..3d08d0f4 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/empUserList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/empUserList.html @@ -17,6 +17,7 @@
@@ -126,7 +127,7 @@ $('#dataGrid').dataGrid({ {header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true); }}, - {header:'${text("操作")}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){ + {header:'${text("操作")}', name:'actions', width:270, sortable:false, title:false, formatter: function(val, obj, row, act){ var actions = []; <% if(hasPermi('sys:empUser:edit')){ %> actions.push(' '); diff --git a/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html b/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html index 9cd289bf..2525716c 100644 --- a/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html +++ b/modules/core/src/main/resources/views/modules/sys/user/secAdminList.html @@ -9,6 +9,7 @@
diff --git a/web/src/main/resources/views/modules/test/testDataList.html b/web/src/main/resources/views/modules/test/testDataList.html index c9df4393..04830961 100644 --- a/web/src/main/resources/views/modules/test/testDataList.html +++ b/web/src/main/resources/views/modules/test/testDataList.html @@ -11,6 +11,7 @@ ${text('新增')} <% } %> 事务测试 +
@@ -123,7 +124,9 @@ $('#dataGrid').dataGrid({ columnModel: [ {header:'${text("单行文本")}', name:'testInput', index:'a.test_input', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){ return ''+(val||row.id)+''; - }}, + }, searchoptions: { dataInit: function (element) { + $(element).attr('form', 'searchForm').attr('name', 'testInput2'); + }}}, {header:'${text("多行文本")}', name:'testTextarea', index:'a.test_textarea', width:150, align:"left"}, {header:'${text("下拉框")}', name:'testSelect', index:'a.test_select', width:150, align:"center", formatter: function(val, obj, row, act){ return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true); @@ -215,6 +218,12 @@ $('#dataGrid').dataGrid({ // $("#dataGrid").parent().append("
没有符合数据
"); // } } +}) +// 开启表头下放搜索工具条 +//.jqGrid('filterToolbar') +// 列表设置显示隐藏或排序后的事件(可用于设置持久化) +.on('jqGridRemapColumns',function(){ + log($('#dataGrid').dataGrid('getParam', 'columnModel')); }); $("#btnTrunsTest").click(function(){ js.ajaxSubmit("${ctx}/test/testData/transTest", function(data){ From 769f89ea67c509a2aad81f49af7fd89fcd17503a Mon Sep 17 00:00:00 2001 From: thinkgem Date: Thu, 30 Jul 2020 10:44:56 +0800 Subject: [PATCH 05/11] add plugin repos --- parent/pom.xml | 6 ++++++ web/pom.xml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/parent/pom.xml b/parent/pom.xml index c58c880e..0b3cb634 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -373,6 +373,12 @@ aliyun-repos https://maven.aliyun.com/repository/public + true + false + + + jeesite-repos + http://maven.jeesite.net/repository/maven-public diff --git a/web/pom.xml b/web/pom.xml index 93bcdd01..09131ecf 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -159,6 +159,12 @@ aliyun-repos https://maven.aliyun.com/repository/public + true + false + + + jeesite-repos + http://maven.jeesite.net/repository/maven-public From b9808181d5efb05734c1907796be532bf1a95359 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Thu, 30 Jul 2020 11:59:16 +0800 Subject: [PATCH 06/11] upgrade boot 2.2.9 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 0b3cb634..48222aa3 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.8.RELEASE + 2.2.9.RELEASE com.jeesite From 44b25989d6fad83f1caeacf0cfbf47f84e03cee5 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Mon, 3 Aug 2020 21:45:45 +0800 Subject: [PATCH 07/11] =?UTF-8?q?jdk11=E4=B8=8B=E9=BB=98=E8=AE=A4=E4=B8=8D?= =?UTF-8?q?=E5=8A=A0=E8=BD=BDjaxb=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E6=AD=A4=E5=8A=A0=E8=BD=BD=E5=AE=9E=E7=8E=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/pom.xml b/common/pom.xml index 376cc390..fc3c78d7 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -95,6 +95,16 @@ ${dom4j.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + + jaxen From c068718fa04139f9a5215b92fb0139612830f127 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 7 Aug 2020 12:50:08 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20ueditor=20=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=20session=20?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/ueditor/1.4/ueditor.all.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js b/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js index 198cc473..eeb0a1b9 100644 --- a/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js +++ b/modules/core/src/main/resources/static/ueditor/1.4/ueditor.all.js @@ -24454,6 +24454,7 @@ UE.plugin.register('simpleupload', function (){ var w = containerBtn.offsetWidth || 20, h = containerBtn.offsetHeight || 20, btnIframe = document.createElement('iframe'), + btnIframe2 = document.createElement('iframe'), // ThinkGem btnStyle = 'display:block;width:' + w + 'px;height:' + h + 'px;overflow:hidden;border:0;margin:0;padding:0;position:absolute;top:0;left:0;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;cursor:pointer;'; domUtils.on(btnIframe, 'load', function(){ @@ -24471,9 +24472,13 @@ UE.plugin.register('simpleupload', function (){ 'style="' + btnStyle + '">' + '' + - '' + - ''; + '';// + + //''; + // 解决因 iframe 嵌套问题 session 丢失 ThinkGem + btnIframe2.id = 'edui_iframe_' + timestrap; + btnIframe2.name = 'edui_iframe_' + timestrap; + wrapper.className = 'edui-' + me.options.theme; wrapper.id = me.ui.id + '_iframeupload'; btnIframeBody.style.cssText = btnStyle; @@ -24488,7 +24493,7 @@ UE.plugin.register('simpleupload', function (){ var form = btnIframeDoc.getElementById('edui_form_' + timestrap); var input = btnIframeDoc.getElementById('edui_input_' + timestrap); - var iframe = btnIframeDoc.getElementById('edui_iframe_' + timestrap); + var iframe = btnIframe2;//btnIframeDoc.getElementById('edui_iframe_' + timestrap); domUtils.on(input, 'change', function(){ if(!input.value) return; @@ -24573,6 +24578,10 @@ UE.plugin.register('simpleupload', function (){ btnIframe.style.cssText = btnStyle; containerBtn.appendChild(btnIframe); + + // 解决因 iframe 嵌套问题 session 丢失 ThinkGem + btnIframe2.style.cssText = 'display:none;width:0;height:0;border:0;margin:0;padding:0;position:absolute;'; + containerBtn.appendChild(btnIframe2); } return { From 32ce44dac4ab98e0c6e5b2ea26e5943107c2087b Mon Sep 17 00:00:00 2001 From: thinkgem Date: Wed, 12 Aug 2020 11:04:27 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=9D=9E=E6=B3=95=E8=AF=B7=E6=B1=82=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=94=99=E8=AF=AF=E5=88=99=E5=BF=BD=E7=95=A5=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/java/com/jeesite/common/codec/DesUtils.java | 6 +++++- modules/core/src/main/resources/config/jeesite-core.yml | 5 +++-- web/src/main/resources/config/application.yml | 5 +++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/jeesite/common/codec/DesUtils.java b/common/src/main/java/com/jeesite/common/codec/DesUtils.java index ee24fbd8..c82fe26b 100644 --- a/common/src/main/java/com/jeesite/common/codec/DesUtils.java +++ b/common/src/main/java/com/jeesite/common/codec/DesUtils.java @@ -43,7 +43,11 @@ public class DesUtils { return ""; } if ("Base64".equals(secretKey)) { - return EncodeUtils.decodeBase64String(data); + try { + return EncodeUtils.decodeBase64String(data); + }catch (IllegalArgumentException e) { + return ""; + } } String[] ks = StringUtils.split(secretKey, ","); if (ks.length >= 3){ diff --git a/modules/core/src/main/resources/config/jeesite-core.yml b/modules/core/src/main/resources/config/jeesite-core.yml index f31ff36b..a4e384ec 100644 --- a/modules/core/src/main/resources/config/jeesite-core.yml +++ b/modules/core/src/main/resources/config/jeesite-core.yml @@ -335,10 +335,11 @@ shiro: # 登录提交信息加密(如果不需要加密,设置为空即可) loginSubmit: - # 登录提交信息安全Key,加密用户名、密码、验证码,后再提交(key设置为3个,用逗号分隔)加密方式:DES - # v4.2.0+ 支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base64 + # 加密用户名、密码、验证码,后再提交(key设置为3个,用逗号分隔)加密方式:DES(4.1.9及之前版本默认设置) + # v4.2.0+ 开始支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base64(4.2.0+默认设置) #secretKey: thinkgem,jeesite,com secretKey: Base64 + #secretKey: ~ # 记住我密钥设置,你可以通过 com.jeesite.test.RememberMeKeyGen 类快速生成一个秘钥。 # 若不设置,则每次启动系统后自动生成一个新秘钥,这样会导致每次重启后,客户端记录的用户信息将失效。 diff --git a/web/src/main/resources/config/application.yml b/web/src/main/resources/config/application.yml index 2f13eca7..d54f52c0 100644 --- a/web/src/main/resources/config/application.yml +++ b/web/src/main/resources/config/application.yml @@ -447,10 +447,11 @@ shiro: # # # 登录提交信息加密(如果不需要加密,设置为空即可) # loginSubmit: -# # 登录提交信息安全Key,加密用户名、密码、验证码,后再提交(key设置为3个,用逗号分隔)加密方式:DES -# # v4.2.0+ 支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base64 +# # 加密用户名、密码、验证码,后再提交(key设置为3个,用逗号分隔)加密方式:DES(4.1.9及之前版本默认设置) +# # v4.2.0+ 开始支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base64(4.2.0+默认设置) # #secretKey: thinkgem,jeesite,com # secretKey: Base64 +# #secretKey: ~ # 记住我密钥设置,你可以通过 com.jeesite.test.RememberMeKeyGen 类快速生成一个秘钥。 # 若不设置,则每次启动系统后自动生成一个新秘钥,这样会导致每次重启后,客户端记录的用户信息将失效。 From c03c75609a362fef2aee04df8ac1dcb7a596d4fe Mon Sep 17 00:00:00 2001 From: thinkgem Date: Wed, 12 Aug 2020 11:17:21 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9B=E8=A1=8C=20xss=20=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jeesite/common/utils/excel/ExcelImport.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/main/java/com/jeesite/common/utils/excel/ExcelImport.java b/common/src/main/java/com/jeesite/common/utils/excel/ExcelImport.java index 6da81d0b..69dc42e1 100644 --- a/common/src/main/java/com/jeesite/common/utils/excel/ExcelImport.java +++ b/common/src/main/java/com/jeesite/common/utils/excel/ExcelImport.java @@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory; import org.springframework.web.multipart.MultipartFile; import com.jeesite.common.callback.MethodCallback; +import com.jeesite.common.codec.EncodeUtils; import com.jeesite.common.collect.ListUtils; import com.jeesite.common.collect.MapUtils; import com.jeesite.common.lang.DateUtils; @@ -478,6 +479,10 @@ public class ExcelImport implements Closeable { // 参数:Exception ex, int rowNum, int columnNum exceptionCallback.execute(ex, i, column); } + // 导入的数据进行 xss 过滤 + if (val != null && val instanceof String) { + val = EncodeUtils.xssFilter(val.toString()); + } // set entity value if (StringUtils.isNotBlank(ef.attrName())){ ReflectUtils.invokeSetter(e, ef.attrName(), val); From 7654cdc6c868a9641621340cc2c802d74485a9b9 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Thu, 13 Aug 2020 14:48:08 +0800 Subject: [PATCH 11/11] v4.2.1 --- modules/core/src/main/resources/db/upgrade/core/versions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/resources/db/upgrade/core/versions b/modules/core/src/main/resources/db/upgrade/core/versions index 37b2dc13..e6ba02b8 100644 --- a/modules/core/src/main/resources/db/upgrade/core/versions +++ b/modules/core/src/main/resources/db/upgrade/core/versions @@ -16,4 +16,5 @@ 4.1.7 4.1.8 4.1.9 -4.2.0 \ No newline at end of file +4.2.0 +4.2.1 \ No newline at end of file