You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jruby-1.6.7 :007 > sand.eval '`ls`'
Sandbox::SandboxException: NoMethodError: undefined method ``' for main:Object
from sandbox/SandboxFull.java:60:in `eval'
from (irb):7:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1197:in `catch'
from org/jruby/RubyKernel.java:1197:in `catch'
from /home/jsimpson/.rvm/rubies/jruby-1.6.7/bin/jirb:17:in `(root)'
jruby-1.6.7 :008 >
The text was updated successfully, but these errors were encountered:
Good catch! We removed access to these from the FakeFS objects that are passed in, but we probably need some kind of a "clean" way to pass in objects to the sandbox that strips them of eval, class_eval and instance_eval.
I'm able to circumvent the sandbox by using a referenced namespace/module. Here's an example:
Shouldn't that be disallowed in the safe mode?
Note: Plain
ls
is not defined.The text was updated successfully, but these errors were encountered: