From 6c798aff7e708d7adcbab74b62483ab3c7929ff7 Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Mon, 6 Sep 2021 15:00:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E4=BC=9A=E7=BB=95=E8=BF=87=E5=88=A0=E9=99=A4=E7=9A=84=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/system/sys_autocode_history.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/service/system/sys_autocode_history.go b/server/service/system/sys_autocode_history.go index 6c796510..479e9ff3 100644 --- a/server/service/system/sys_autocode_history.go +++ b/server/service/system/sys_autocode_history.go @@ -61,6 +61,13 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(id uint) error { // 删除文件 for _, path := range strings.Split(md.AutoCodePath, ";") { + + // 增加安全判断补丁: + _path, err := filepath.Abs(path) + if err != nil || _path != path { + continue + } + // 迁移 nPath := filepath.Join(global.GVA_CONFIG.AutoCode.Root, "rm_file", time.Now().Format("20060102"), filepath.Base(filepath.Dir(filepath.Dir(path))), filepath.Base(filepath.Dir(path)), filepath.Base(path)) From 1a74144e48e8915510fee864eebebd7eb141e570 Mon Sep 17 00:00:00 2001 From: piexlmax Date: Tue, 7 Sep 2021 14:55:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Duser=E8=A1=A8=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=A1=B5=E9=9D=A2=E5=92=8Csize=E5=90=8E=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=B6=88=E5=A4=B1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/superAdmin/user/user.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/view/superAdmin/user/user.vue b/web/src/view/superAdmin/user/user.vue index 75612aef..a79be8e3 100644 --- a/web/src/view/superAdmin/user/user.vue +++ b/web/src/view/superAdmin/user/user.vue @@ -147,9 +147,13 @@ export default { computed: { ...mapGetters('user', ['token']) }, + watch: { + tableData() { + this.setAuthorityIds() + } + }, async created() { await this.getTableData() - this.setAuthorityIds() const res = await getAuthorityList({ page: 1, pageSize: 999 }) this.setOptions(res.data.list) }, @@ -194,7 +198,6 @@ export default { if (res.code === 0) { this.$message.success('删除成功') await this.getTableData() - this.setAuthorityIds() row.visible = false } }, @@ -207,7 +210,6 @@ export default { this.$message({ type: 'success', message: '创建成功' }) } await this.getTableData() - this.setAuthorityIds() this.closeAddUserDialog() } }) @@ -234,7 +236,7 @@ export default { this.$message({ type: 'success', message: '角色设置成功' }) } }) - } + }, } }