Sandboxing JSR-223

前端 未结 3 1465
野的像风
野的像风 2020-12-24 08:38

I\'m trying to sandbox JSR-223. Specifically, I don\'t want any script to have access to any of my classes. (I hear Rhino can do that with ClassShutter, but I want to do it

3条回答
  •  梦谈多话
    2020-12-24 09:23

    See http://code.google.com/p/prebake/source/browse/trunk/code/src/org/prebake/js/RhinoExecutor.java and related classes in the same package, especially the SANDBOXING_FACTORY there.

    That's some code that sandboxes a rhino interpreter to allow it access to the filesystem mediated by a loader.

提交回复
热议问题