From a1c77829cdfc41e9aeb59d30a460a666b7b846c9 Mon Sep 17 00:00:00 2001 From: insistence <3055204202@qq.com> Date: Wed, 31 Jul 2024 10:59:01 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=A1=A5=E5=85=85=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=BF=9D=E8=A7=84=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-fastapi-backend/config/constant.py | 37 +++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/ruoyi-fastapi-backend/config/constant.py b/ruoyi-fastapi-backend/config/constant.py index 9129fe0..6db32da 100644 --- a/ruoyi-fastapi-backend/config/constant.py +++ b/ruoyi-fastapi-backend/config/constant.py @@ -76,7 +76,7 @@ class JobConstant: """ 定时任务常量 - JOB_ERROR_LIST: 定时任务禁止调用模块列表 + JOB_ERROR_LIST: 定时任务禁止调用模块及违规字符串列表 JOB_WHITE_LIST: 定时任务允许调用模块列表 """ @@ -84,11 +84,46 @@ class JobConstant: 'app', 'config', 'exceptions', + 'import ', 'middlewares', 'module_admin', + 'open(', + 'os.', 'server', 'sub_applications', + 'subprocess.', + 'sys.', 'utils', + 'while ', + '__import__', + '"', + "'", + ',', + '?', + ':', + ';', + '/', + '|', + '+', + '-', + '=', + '~', + '!', + '#', + '$', + '%', + '^', + '&', + '*', + '<', + '>', + '(', + ')', + '[', + ']', + '{', + '}', + ' ', ] JOB_WHITE_LIST = ['module_task']