diff --git a/common/pom.xml b/common/pom.xml index 4f7549b4..fc3c78d7 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 @@ -95,6 +95,16 @@ ${dom4j.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime + + jaxen 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/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/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); 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](); 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/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/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 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/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 { 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 a19b8261..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 @@ 访问日志
@@ -67,10 +68,12 @@
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/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..48222aa3 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -6,12 +6,12 @@ org.springframework.boot spring-boot-starter-parent - 2.2.8.RELEASE + 2.2.9.RELEASE com.jeesite jeesite-parent - 4.2.0-SNAPSHOT + 4.2.1-SNAPSHOT pom JeeSite Parent @@ -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/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..09131ecf 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 @@ -159,6 +159,12 @@ aliyun-repos https://maven.aliyun.com/repository/public + true + false + + + jeesite-repos + http://maven.jeesite.net/repository/maven-public 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 类快速生成一个秘钥。 # 若不设置,则每次启动系统后自动生成一个新秘钥,这样会导致每次重启后,客户端记录的用户信息将失效。 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){