diff options
author | Omair Majid <[email protected]> | 2010-11-24 10:53:38 -0500 |
---|---|---|
committer | Omair Majid <[email protected]> | 2010-11-24 10:53:38 -0500 |
commit | 94d10d5d7e572975be0a7405a2b1b553e562e6fa (patch) | |
tree | 7acc08f2d101426ad21e3914a5a4274c16a1623a /netx/net/sourceforge/jnlp/SecurityDesc.java | |
parent | 885472d0392efe44a2ad600612d91631479969ad (diff) |
fix infinite recursion in determining sandbox permissions
2010-11-24 Omair Majid <[email protected]>
* netx/net/sourceforge/jnlp/SecurityDesc.java: Add grantAwtPermissions.
(SecurityDesc): Set grantAwtPermissions.
(getSandboxPermissions): Use grantAwtPermissions to determine whether to
grant permissions.
Diffstat (limited to 'netx/net/sourceforge/jnlp/SecurityDesc.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/SecurityDesc.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/SecurityDesc.java b/netx/net/sourceforge/jnlp/SecurityDesc.java index e7a9706..c5ddec4 100644 --- a/netx/net/sourceforge/jnlp/SecurityDesc.java +++ b/netx/net/sourceforge/jnlp/SecurityDesc.java @@ -53,6 +53,9 @@ public class SecurityDesc { /** the download host */ private String downloadHost; + /** whether sandbox applications should get the show window without banner permission */ + private final boolean grantAwtPermissions; + /** the JNLP file */ private JNLPFile file; @@ -146,6 +149,9 @@ public class SecurityDesc { this.file = file; this.type = type; this.downloadHost = downloadHost; + + String key = DeploymentConfiguration.KEY_SECURITY_ALLOW_HIDE_WINDOW_WARNING; + grantAwtPermissions = Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(key)); } /** @@ -188,8 +194,7 @@ public class SecurityDesc { for (int i=0; i < sandboxPermissions.length; i++) permissions.add(sandboxPermissions[i]); - String key = DeploymentConfiguration.KEY_SECURITY_ALLOW_HIDE_WINDOW_WARNING; - if (Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(key)) == Boolean.TRUE) { + if (grantAwtPermissions) { permissions.add(new AWTPermission("showWindowWithoutWarningBanner")); } |