aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2012-06-07 11:12:03 -0400
committerDeepak Bhole <[email protected]>2012-06-07 11:12:03 -0400
commitb791c7480534cf1739b38174e1fab8a7b272b8ec (patch)
tree998e56538747352c8c4ace96731e47f177e65b86
parent5319aa17959526c2848fb091cf0fe52b34b54334 (diff)
Fixed bug in previous commit for PR861
-rw-r--r--ChangeLog6
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f42b22a..1b2c8bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-06 Deepak Bhole <[email protected]>
+
+ * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+ (getAccessControlContextForClassLoading): Iterate over codebase URLs only
+ if codeBaseLoader is not null.
+
2012-06-05 Deepak Bhole <[email protected]>
PR861: Allow loading from non codebase hosts. Allow code to connect to
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
index f4e71ea..a5c8403 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
@@ -1990,10 +1990,12 @@ public class JNLPClassLoader extends URLClassLoader {
"connect, accept"));
}
- // Permissions for codebase urls
- for (URL u : codeBaseLoader.getURLs()) {
- permissions.add(new SocketPermission(u.getHost(),
- "connect, accept"));
+ // Permissions for codebase urls (if there is a loader)
+ if (codeBaseLoader != null) {
+ for (URL u : codeBaseLoader.getURLs()) {
+ permissions.add(new SocketPermission(u.getHost(),
+ "connect, accept"));
+ }
}
ProtectionDomain pd = new ProtectionDomain(null, permissions);