Safely sandbox and execute user submitted JavaScript?

后端 未结 5 1599
别跟我提以往
别跟我提以往 2020-11-30 00:52

I would like to have the ability to let users submit arbitrary JavaScript code, which is then sent to a Node.JS server and safely executed before the output is sent back to

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 01:08

    This answer is outdated as gf3 does not provide protection against sandbox breaking

    http://gf3.github.io/sandbox/ - it uses require('child_process') instead of require('vm').

提交回复
热议问题