Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval with ScriptContext ignores settings #70

Open
everestbt opened this issue Dec 5, 2018 · 2 comments
Open

Eval with ScriptContext ignores settings #70

everestbt opened this issue Dec 5, 2018 · 2 comments
Labels

Comments

@everestbt
Copy link
Contributor

As with issue #67, when a ScriptContext is used it will ignore the settings chosen.

This is exposed by a currently ignored test: testQuitWithScriptContext()

My only proposed solution at the moment is to disallow this method with an UnsupportedOperationException, this does create backwards compatibility issues but with the current implementation it is unclear that this will be the result.

@Dennyjomiller98
Copy link

Dennyjomiller98 commented Jan 21, 2021

Is this still an issue?

I'm wondering as when trying to create a new sandbox and disable all functions except allowPrintFunctions(true), the other allowExitFunctions(false) seem to be ignored, allowing quit(); to run on the script.
Edit: For clarification, this is when using sandbox.eval(script, context);, without setting custom bindings.
Edit2: inject() gets me where I want without the use of .eval(script, context).

@mxro
Copy link
Collaborator

mxro commented Jan 30, 2021

Hey @Dennyjomiller98 thank you for your comment!

Yes this is still an issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants