mipengine / mip2

MIP (移动网页加速器)通过优化网页JS、控制资源加载顺序,达到加速网页的效果。
https://www.mipengine.org/
MIT License
184 stars 49 forks source link

mip-sandbox 修复严格模式下的漏洞 #568

Closed clark-t closed 5 years ago

clark-t commented 5 years ago

BUG 描述

  1. 目前 MIP.sandbox.strict.MIP.sandbox 会拿到 MIP.sandbox 对象全集,这是不对的,在严格模式下 MIP.sandbox.strict.MIP.sandbox 应该指向 MIP.sandbox.strict,即 MIP.sandbox 对象的子集;
  2. MIP.sandbox.strict.MIP.util 对象下面存在很多能够操作 dom 的方法,这些在严格模式下同样是需要禁止的,因此只需要开放 'platform', 'customStorage', 'jsonParse', 'string' 即可
clark-t commented 5 years ago

done