Groovy Module (Platform)
Last modified by Vincent Massol on 2024/07/05 17:58
Platform-specific Groovy Compilation Customizers |
Type | JAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Description
This module complements the Commons Groovy Module by adding the following features:
- A Secure Customizer allowing to run Groovy scripts in a Security Sandbox
Secure Customizer
At this point in time the Secure Customizer is pretty restrictive in what it allows. We'll loosen it as a progress to allow more and more safe operations to be performed.
Currently:
- Prevents bytecode expressions and sequences
- Prevents synchronized blocks
- Prevents imports
- Prevents method definition
- Prevents any token
Examples
Forbidden:
- synchronized(this) { }
- System.exit(0)
- "Hello World".value[0]
Allowed:
- new Integer(6)
Prerequisites & Installation Instructions
No Groovy Customizers are defined by default.
To add a Compilation Customizer see Groovy Module (Commons).
More specifically to enable the Secure Customizer, add the following to xwiki.properties:
groovy.compilationCustomizers=secure