From 7a8a98424cae3ab26470061fe2f2a4c1272ccf81 Mon Sep 17 00:00:00 2001 From: IceCola <739201322@qq.com> Date: Mon, 27 May 2024 15:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=9B=E8=A6=86=E7=9B=96=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/util/security.js | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/noname/util/security.js b/noname/util/security.js index 78823224d..4ad2c20f1 100644 --- a/noname/util/security.js +++ b/noname/util/security.js @@ -565,18 +565,6 @@ function createSandbox() { // TODO: 仅提供必要的document函数(?) box.document = document; - if (topVariables.game - && topVariables.game.ws) { - const match = WSURL_FOR_IP.exec(topVariables.game.ws.url); - - if (match && TRUSTED_IPS.includes(match[1])) { - box.scope.ArrayBuffer = ArrayBuffer; - box.scope.localStorage = localStorage; - box.scope.exports = undefined; - box.scope.define = undefined; - } - } - // 传递七个变量 Object.assign(box.scope, topVariables); // 复制垫片函数 @@ -897,11 +885,11 @@ function setupPolyfills(sandbox) { } // 测试暴露喵 -Reflect.defineProperty(window, "sandbox", { - get: () => defaultSandbox, - set: () => { }, - configurable: true, -}); +// Reflect.defineProperty(window, "sandbox", { +// get: () => defaultSandbox, +// set: () => { }, +// configurable: true, +// }); const exports = { enterSandbox,