mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
build: 屏蔽敏感环境变量
This commit is contained in:
parent
52e883c65c
commit
677ce46b49
|
|
@ -47,6 +47,11 @@ class FunctionExecutor:
|
|||
path = r'' + self.sandbox_path + ''
|
||||
_exec_code = f"""
|
||||
try:
|
||||
import os
|
||||
env = dict(os.environ)
|
||||
for key in list(env.keys()):
|
||||
if key in os.environ and (key.startswith('MAXKB') or key.startswith('POSTGRES') or key.startswith('PG')):
|
||||
del os.environ[key]
|
||||
locals_v={'{}'}
|
||||
keywords={keywords}
|
||||
globals_v=globals()
|
||||
|
|
|
|||
Loading…
Reference in New Issue