Hi,
I'm using JRuby to allow users to script my Java framework and extend it
through Ruby script at plug points.
What I want to do is only allow the Ruby script access to the Java objects I
pass into the JSR 223 context, i.e. I want to prohibit a user accessing the
file system, network etc. through the available Java classes.
Is there anyway to stop this example evaled Ruby from working (calling via JSR
223):
ScriptEngineManager scriptEngineMgr = new ScriptEngineManager();
ScriptEngine engine = scriptEngineMgr.getEngineByName("jruby");
engine.eval("r = java.util.Random.new \n puts r.nextInt");
i.e. stopping Ruby code creating or statically calling Java objects.
Thanks for the help.
Tegan
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.