Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
1e37f043
Commit
1e37f043
authored
Aug 19, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务屏蔽ldap远程调用
parent
29517325
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
...on/src/main/java/com/ruoyi/common/constant/Constants.java
+6
-1
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
...in/java/com/ruoyi/quartz/controller/SysJobController.java
+8
-0
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
View file @
1e37f043
...
...
@@ -68,7 +68,7 @@ public class Constants
* 登录用户 redis key
*/
public
static
final
String
LOGIN_TOKEN_KEY
=
"login_tokens:"
;
/**
* 防重提交 redis key
*/
...
...
@@ -143,4 +143,9 @@ public class Constants
* RMI 远程方法调用
*/
public
static
final
String
LOOKUP_RMI
=
"rmi://"
;
/**
* LDAP 远程方法调用
*/
public
static
final
String
LOOKUP_LDAP
=
"ldap://"
;
}
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
View file @
1e37f043
...
...
@@ -88,6 +88,10 @@ public class SysJobController extends BaseController
{
return
error
(
"新增任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'rmi://'调用"
);
}
else
if
(
StringUtils
.
containsIgnoreCase
(
job
.
getInvokeTarget
(),
Constants
.
LOOKUP_LDAP
))
{
return
error
(
"新增任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'ldap://'调用"
);
}
else
if
(
StringUtils
.
containsAnyIgnoreCase
(
job
.
getInvokeTarget
(),
new
String
[]
{
Constants
.
HTTP
,
Constants
.
HTTPS
}))
{
return
error
(
"新增任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'http(s)//'调用"
);
...
...
@@ -112,6 +116,10 @@ public class SysJobController extends BaseController
{
return
error
(
"修改任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'rmi://'调用"
);
}
else
if
(
StringUtils
.
containsIgnoreCase
(
job
.
getInvokeTarget
(),
Constants
.
LOOKUP_LDAP
))
{
return
error
(
"修改任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'ldap://'调用"
);
}
else
if
(
StringUtils
.
containsAnyIgnoreCase
(
job
.
getInvokeTarget
(),
new
String
[]
{
Constants
.
HTTP
,
Constants
.
HTTPS
}))
{
return
error
(
"修改任务'"
+
job
.
getJobName
()
+
"'失败,目标字符串不允许'http(s)//'调用"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment