Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Consider the following:
CompilerConfiguration configuration = new CompilerConfiguration() SecureASTCustomizer customizer = new SecureASTCustomizer() configuration.addCompilationCustomizers(customizer) customizer.starImportsBlacklist = ['javax.**'] def shell = new GroovyShell(configuration) shell.evaluate(''' import javax.swing.Action Action act ''')
This should throw SecurityException since all of "javax" packages have been blocked.