From 743ae529b6222aeaaa5dd79a7e859ffab0941976 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 24 Nov 2016 16:37:51 +0800 Subject: [PATCH] new RuntimePermission("canProcessApplicationEvents") --- source/net/filebot/format/SecureCompiledScript.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/format/SecureCompiledScript.java b/source/net/filebot/format/SecureCompiledScript.java index 8a39c358..91f74bdc 100644 --- a/source/net/filebot/format/SecureCompiledScript.java +++ b/source/net/filebot/format/SecureCompiledScript.java @@ -38,11 +38,14 @@ public class SecureCompiledScript extends CompiledScript { permissions.add(new RuntimePermission("loadLibrary.*")); permissions.add(new RuntimePermission("accessClassInPackage.*")); permissions.add(new RuntimePermission("accessDeclaredMembers")); + permissions.add(new RuntimePermission("canProcessApplicationEvents")); permissions.add(new RuntimePermission("getenv.*")); permissions.add(new RuntimePermission("getFileSystemAttributes")); permissions.add(new RuntimePermission("readFileDescriptor")); permissions.add(new RuntimePermission("preferences")); - permissions.add(new AWTPermission("*")); + permissions.add(new AWTPermission("toolkitModality")); + permissions.add(new AWTPermission("setWindowAlwaysOnTop")); + permissions.add(new AWTPermission("showWindowWithoutWarningBanner")); permissions.add(new FilePermission("<>", "read")); permissions.add(new SocketPermission("*", "connect")); permissions.add(new PropertyPermission("*", "read")); @@ -54,7 +57,7 @@ public class SecureCompiledScript extends CompiledScript { // write permissions for cache and temp folders for (ApplicationFolder it : ApplicationFolder.values()) { - permissions.add(new FilePermission(it.getCanonicalFile() + File.separator + "-", "read, write, delete")); + permissions.add(new FilePermission(it.get() + File.separator + "-", "read, write, delete")); } return permissions;