build: 屏蔽敏感环境变量
This commit is contained in:
parent
52e883c65c
commit
677ce46b49
@ -47,6 +47,11 @@ class FunctionExecutor:
|
|||||||
path = r'' + self.sandbox_path + ''
|
path = r'' + self.sandbox_path + ''
|
||||||
_exec_code = f"""
|
_exec_code = f"""
|
||||||
try:
|
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={'{}'}
|
locals_v={'{}'}
|
||||||
keywords={keywords}
|
keywords={keywords}
|
||||||
globals_v=globals()
|
globals_v=globals()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user