Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
tool
/
xxl-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7503bcb2
authored
Nov 10, 2024
by
xuxueli
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Glue代码保存越权问题处理
1 parent
0885d7d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
doc/XXL-JOB官方文档.md
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java
doc/XXL-JOB官方文档.md
View file @
7503bcb
...
...
@@ -2369,8 +2369,12 @@ public void execute() {
### 7.35 版本 v2.4.2 Release Notes[规划中]
-
1、【升级】多个项目依赖升级至较新稳定版本,涉及netty、groovy、gson、springboot、mybatis等;
-
2、【修复】"CVE-2024-42681" 子任务越权漏洞修复;
-
3、【修复】"CVE-2023-33779" 任务API越权问题修复;
-
3、【优化】Cron解析组件优化代码优化。
-
4、【优化】修改密码交互优化,解决CSRF隐患。
-
4、【优化】修改密码交互调整,解决CSRF问题隐患。
备注:“CVE-2024-38820”漏洞源自spring,当前使用spring5.x及springboot2.x软件普遍受该问题影响。
该问题修复需要升级至spring6.x与springboot3.x,如有诉求可自行升级,计划下个大版本升级spring相关版本解决该问题。
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobCodeController.java
View file @
7503bcb
...
...
@@ -56,7 +56,7 @@ public class JobCodeController {
@RequestMapping
(
"/save"
)
@ResponseBody
public
ReturnT
<
String
>
save
(
Model
model
,
int
id
,
String
glueSource
,
String
glueRemark
)
{
public
ReturnT
<
String
>
save
(
HttpServletRequest
request
,
int
id
,
String
glueSource
,
String
glueRemark
)
{
// valid
if
(
glueRemark
==
null
)
{
return
new
ReturnT
<
String
>(
500
,
(
I18nUtil
.
getString
(
"system_please_input"
)
+
I18nUtil
.
getString
(
"jobinfo_glue_remark"
))
);
...
...
@@ -64,23 +64,26 @@ public class JobCodeController {
if
(
glueRemark
.
length
()<
4
||
glueRemark
.
length
()>
100
)
{
return
new
ReturnT
<
String
>(
500
,
I18nUtil
.
getString
(
"jobinfo_glue_remark_limit"
));
}
XxlJobInfo
exists
_j
obInfo
=
xxlJobInfoDao
.
loadById
(
id
);
if
(
exists
_j
obInfo
==
null
)
{
XxlJobInfo
exists
J
obInfo
=
xxlJobInfoDao
.
loadById
(
id
);
if
(
exists
J
obInfo
==
null
)
{
return
new
ReturnT
<
String
>(
500
,
I18nUtil
.
getString
(
"jobinfo_glue_jobid_unvalid"
));
}
// valid permission
PermissionInterceptor
.
validJobGroupPermission
(
request
,
existsJobInfo
.
getJobGroup
());
// update new code
exists
_j
obInfo
.
setGlueSource
(
glueSource
);
exists
_j
obInfo
.
setGlueRemark
(
glueRemark
);
exists
_j
obInfo
.
setGlueUpdatetime
(
new
Date
());
exists
J
obInfo
.
setGlueSource
(
glueSource
);
exists
J
obInfo
.
setGlueRemark
(
glueRemark
);
exists
J
obInfo
.
setGlueUpdatetime
(
new
Date
());
exists
_j
obInfo
.
setUpdateTime
(
new
Date
());
xxlJobInfoDao
.
update
(
exists
_j
obInfo
);
exists
J
obInfo
.
setUpdateTime
(
new
Date
());
xxlJobInfoDao
.
update
(
exists
J
obInfo
);
// log old code
XxlJobLogGlue
xxlJobLogGlue
=
new
XxlJobLogGlue
();
xxlJobLogGlue
.
setJobId
(
exists
_j
obInfo
.
getId
());
xxlJobLogGlue
.
setGlueType
(
exists
_j
obInfo
.
getGlueType
());
xxlJobLogGlue
.
setJobId
(
exists
J
obInfo
.
getId
());
xxlJobLogGlue
.
setGlueType
(
exists
J
obInfo
.
getGlueType
());
xxlJobLogGlue
.
setGlueSource
(
glueSource
);
xxlJobLogGlue
.
setGlueRemark
(
glueRemark
);
...
...
@@ -89,7 +92,7 @@ public class JobCodeController {
xxlJobLogGlueDao
.
save
(
xxlJobLogGlue
);
// remove code backup more than 30
xxlJobLogGlueDao
.
removeOld
(
exists
_j
obInfo
.
getId
(),
30
);
xxlJobLogGlueDao
.
removeOld
(
exists
J
obInfo
.
getId
(),
30
);
return
ReturnT
.
SUCCESS
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment