Skip to content

add the possibility of showing the stacktrace when an exeption in raise in the sandboxed code #14

Closed
wants to merge 1 commit into from

2 participants

@xcombelle

the use is as follow

def f():
    x
from sandbox import Sandbox, SandboxConfig,SandboxError
sandbox = Sandbox(SandboxConfig('stderr',use_subprocess=True))
try:
    result = sandbox.call(f)
except SandboxError as e:
    if hasattr(e,'stacktrace'):
        print (e.stacktrace)
    else:
        raise

moreover the modifications remove a security issue as the Exception was previously pickled and could be execute untrested code when unpickled

Xavier Combelle show stacktrace 1bbc63e
@haypo
Owner
haypo commented Dec 17, 2013

I now consider the pysandbox project is broken by design, so I'm not going to modify it anymore, sorry.

@haypo haypo closed this Dec 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.