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

Sandbox ignoring Owners and Delegates of nested Closures. #41

Open
BloodWorkXGaming opened this issue Oct 17, 2017 · 0 comments
Open

Sandbox ignoring Owners and Delegates of nested Closures. #41

BloodWorkXGaming opened this issue Oct 17, 2017 · 0 comments

Comments

@BloodWorkXGaming
Copy link

If I have nested Closures and I try to access something from the outside Closure I will run into a problem as it is only checking the functions from the inner Closure.

Here is an attempted fix for it:

https://github.com/BloodWorkXGaming/GroovySandboxedLauncher/blob/82761afcc3f69b5e17bd47784b76ccca01dc0495/src/main/java/org/kohsuke/groovy/sandbox/impl/ClosureSupport.java#L28-L65

The already existing code is smart enough to check it in the correct order, while the recursion adds the other objects to the back of the list the deeper we go in the hierarchy.

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

No branches or pull requests

1 participant