-
Notifications
You must be signed in to change notification settings - Fork 82
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 bindings ignoring allowExitFunctions(false) settings #67
Comments
…karound. This will run the assertScriptEngine() anytime bindings are sent in.
Opened #68. |
This appears to impact all function limitations enforced by bindings, i.e. |
#67:Added tests to expose bindings problem. Introduced workaround.
Thanks heaps for the pull request. This is all merged now and published with version 0.1.17! Is the issue resolved now? |
@mxro Thanks for merging it in. I have been working on optimising the fix a little more, I have a bit more testing to do on this but by Tuesday I should have an improved fix on a pull request. |
@everestbt That sounds awesome! Looking forward to the fix - will do my best to merge it in faster this time 😃 |
Changed the bindings protection to cache an initial Secure set of bindings, which are then put into custom bindings, and also used to check whether the engine bindings need to be reset. This does not protect from malicious actors!
#67-2: Remove extra evaluations for bindings by introducing a cached set of bindings
Version 0.1.18 released to Maven Central including this fix. Let me know if there is anything else to be done for this issue, otherwise we can close. Thank you for fixing this 👍 |
Great, do you want me to open another issue in relation to ScriptContext having the same issue, there is an ignored test indicating this in the testExit: |
Yes please :) |
I have opened #70. Closing this as resolved. |
While trying to wire this up I found an issue with
allowExitFunctions(false)
. When this is set and theneval(String js,Bindings bindings)
is called, for example for the script "quit()" it will exit the JVM, counterposed to the intent of the setting.This appears to be due to the bindings overwriting the original settings. I am not very familiar with Nashorn so my assumptions of the impact of
Bindings
and the persistence of these methods could be false. For usability I believe it would be helpful that, regardless ofBindings
the settings are applied.The text was updated successfully, but these errors were encountered: