mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-04 08:25:03 -05:00
* added network permission in ExpressionFormat sandbox
This commit is contained in:
parent
b04f89b7fd
commit
0b30c631ed
@ -8,6 +8,7 @@ import groovy.lang.MissingPropertyException;
|
||||
|
||||
import java.io.FilePermission;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.SocketPermission;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessControlException;
|
||||
import java.security.AccessController;
|
||||
@ -220,6 +221,7 @@ public class ExpressionFormat extends Format {
|
||||
|
||||
permissions.add(new RuntimePermission("createClassLoader"));
|
||||
permissions.add(new FilePermission("<<ALL FILES>>", "read"));
|
||||
permissions.add(new SocketPermission("*", "connect"));
|
||||
permissions.add(new PropertyPermission("*", "read"));
|
||||
permissions.add(new RuntimePermission("getenv.*"));
|
||||
|
||||
|
@ -9,6 +9,13 @@ String.metaClass.lower = { toLowerCase() }
|
||||
String.metaClass.upper = { toUpperCase() }
|
||||
|
||||
|
||||
/**
|
||||
* Allow comparison of Strings and Numbers (overloading of comparison operators is not supported yet though)
|
||||
*/
|
||||
String.metaClass.compareTo = { Number other -> delegate.compareTo(other.toString()) }
|
||||
Number.metaClass.compareTo = { String other -> delegate.toString().compareTo(other) }
|
||||
|
||||
|
||||
/**
|
||||
* Pad strings or numbers with given characters ('0' by default).
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user