Skip to content

Commit a1c7782

Browse files
committed
perf: 补充定时任务违规字符串
1 parent 07771c1 commit a1c7782

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

ruoyi-fastapi-backend/config/constant.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,54 @@ class JobConstant:
7676
"""
7777
定时任务常量
7878
79-
JOB_ERROR_LIST: 定时任务禁止调用模块列表
79+
JOB_ERROR_LIST: 定时任务禁止调用模块及违规字符串列表
8080
JOB_WHITE_LIST: 定时任务允许调用模块列表
8181
"""
8282

8383
JOB_ERROR_LIST = [
8484
'app',
8585
'config',
8686
'exceptions',
87+
'import ',
8788
'middlewares',
8889
'module_admin',
90+
'open(',
91+
'os.',
8992
'server',
9093
'sub_applications',
94+
'subprocess.',
95+
'sys.',
9196
'utils',
97+
'while ',
98+
'__import__',
99+
'"',
100+
"'",
101+
',',
102+
'?',
103+
':',
104+
';',
105+
'/',
106+
'|',
107+
'+',
108+
'-',
109+
'=',
110+
'~',
111+
'!',
112+
'#',
113+
'$',
114+
'%',
115+
'^',
116+
'&',
117+
'*',
118+
'<',
119+
'>',
120+
'(',
121+
')',
122+
'[',
123+
']',
124+
'{',
125+
'}',
126+
' ',
92127
]
93128
JOB_WHITE_LIST = ['module_task']
94129

0 commit comments

Comments
 (0)