diff options
author | Adam Domurad <[email protected]> | 2013-03-26 14:57:33 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-03-26 14:57:33 -0400 |
commit | 58b4d6e3dc3a95cfbc6f369287aca04763522e48 (patch) | |
tree | c31e0146381288222138a667844893106772d87e /plugin/icedteanp | |
parent | c4f2dc4c8dc8c025c5d27c627717a164755986ae (diff) |
Integration of unsigned applet confirmation dialogue.
Diffstat (limited to 'plugin/icedteanp')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index 8a4f078..9151d5e 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -62,6 +62,8 @@ exception statement from your version. */ package sun.applet; +import static net.sourceforge.jnlp.runtime.Translator.R; + import java.applet.Applet; import java.applet.AppletContext; import java.applet.AudioClip; @@ -103,9 +105,13 @@ import java.util.concurrent.locks.ReentrantLock; import javax.swing.SwingUtilities; +import net.sourceforge.jnlp.LaunchException; import net.sourceforge.jnlp.NetxPanel; import net.sourceforge.jnlp.PluginParameters; import net.sourceforge.jnlp.runtime.JNLPClassLoader; +import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityLevel; +import net.sourceforge.jnlp.security.appletextendedsecurity.AppletStartupSecuritySettings; +import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteUnsignedApplet; import net.sourceforge.jnlp.splashscreen.SplashController; import net.sourceforge.jnlp.splashscreen.SplashPanel; import net.sourceforge.jnlp.splashscreen.SplashUtils; @@ -406,7 +412,12 @@ public class PluginAppletViewer extends XEmbeddedFrame requestFactory = rf; } - private static void handleInitializationMessage(int identifier, String message) throws IOException { + private static void handleInitializationMessage(int identifier, String message) throws IOException, LaunchException { + + /* The user has specified via a global setting that applets should not be run.*/ + if (AppletStartupSecuritySettings.getInstance().getSecurityLevel() == AppletSecurityLevel.DENY_ALL) { + throw new LaunchException(null, null, R("LSFatal"), R("LCClient"), R("LUnsignedApplet"), R("LUnsignedAppletPolicyDenied")); + } // If there is a key for this status, it means it // was either initialized before, or destroy has been |