How do I secure scripts run using javax.scripting?

前端 未结 3 773
时光取名叫无心
时光取名叫无心 2021-02-07 08:41

I am using javax.scripting to add support for running arbitrary user-uploaded JavaScripts on the server-side. Obviously I want to secure those scripts!

Rhi

3条回答
  •  春和景丽
    2021-02-07 09:34

    FYI, this is now possible in the new Java 8 implementation of javax.scripting which uses a new engine called Nashorn. See Secure Nashorn JS Execution

提交回复
热议问题