diff --git a/server/utils/sandbox.js b/server/utils/sandbox.js index 146dcc1d7..ce6841ca9 100644 --- a/server/utils/sandbox.js +++ b/server/utils/sandbox.js @@ -7,7 +7,7 @@ module.exports = async function sandboxFn(context, script) { asyncTimeout: 60000 }) - script += "; return this;"; + script += "; delete this.global; return this;"; // 执行动态代码 const result = await safeVm.run(script, context)