/hg/release/icedtea-web-1.2: Plugin does not make JNLP's <inform...

ddadacha at icedtea.classpath.org ddadacha at icedtea.classpath.org
Tue Jan 24 12:55:16 PST 2012


changeset 21183f821dd4 in /hg/release/icedtea-web-1.2
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.2?cmd=changeset;node=21183f821dd4
author: Danesh Dadachanji <ddadacha at redhat.com>
date: Tue Jan 24 15:33:51 2012 -0500

	Plugin does not make JNLP's <information> available when using
	jnlp_href.


diffstat:

 ChangeLog                                                 |  14 ++++++++++++++
 netx/net/sourceforge/jnlp/PluginBridge.java               |  13 ++++---------
 netx/net/sourceforge/jnlp/resources/Messages.properties   |   1 +
 netx/net/sourceforge/jnlp/security/AccessWarningPane.java |   4 +++-
 4 files changed, 22 insertions(+), 10 deletions(-)

diffs (83 lines):

diff -r 41f03d932cdf -r 21183f821dd4 ChangeLog
--- a/ChangeLog	Mon Jan 09 18:45:31 2012 -0500
+++ b/ChangeLog	Tue Jan 24 15:33:51 2012 -0500
@@ -1,3 +1,17 @@
+2012-01-06  Danesh Dadachanji  <ddadacha at redhat.com>
+
+	Use the JNLP file's information section for the Name and
+	Publisher labels of access dialogs, if available.
+	* netx/net/sourceforge/jnlp/PluginBridge.java:
+	(PluginBridge): Assigned info variable to JNLP file's information
+	section (if one is used), otherwise to a new, empty ArrayList.
+	(getInformation): Removed method, superclass method
+	should be used instead.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	Adding SUnverified.
+	* a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java:
+	(addComponents): Append unverified note to the publisher label.
+
 2012-01-09  Deepak Bhole <dbhole at redhat.com>
 
 	PR838: IcedTea plugin crashes with chrome browser when javascript is executed
diff -r 41f03d932cdf -r 21183f821dd4 netx/net/sourceforge/jnlp/PluginBridge.java
--- a/netx/net/sourceforge/jnlp/PluginBridge.java	Mon Jan 09 18:45:31 2012 -0500
+++ b/netx/net/sourceforge/jnlp/PluginBridge.java	Tue Jan 24 15:33:51 2012 -0500
@@ -60,6 +60,7 @@
                 URL jnlp = new URL(codeBase.toExternalForm() + atts.get("jnlp_href"));
                 JNLPFile jnlpFile = new JNLPFile(jnlp, null, false, JNLPRuntime.getDefaultUpdatePolicy(), this.codeBase);
                 Map<String, String> jnlpParams = jnlpFile.getApplet().getParameters();
+                info = jnlpFile.info;
 
                 // Change the parameter name to lowercase to follow conventions.
                 for (Map.Entry<String, String> entry : jnlpParams.entrySet()) {
@@ -76,6 +77,9 @@
                 System.err.println("Unable to get JNLP file at: " + codeBase.toExternalForm()
                         + atts.get("jnlp_href"));
             }
+        } else {
+            // Should we populate this list with applet attribute tags?
+            info = new ArrayList<InformationDesc>();
         }
 
         // also, see if cache_archive is specified
@@ -180,15 +184,6 @@
         return name;
     }
 
-    public InformationDesc getInformation(final Locale locale) {
-        return new InformationDesc(this, new Locale[] { locale }) {
-            protected List<Object> getItems(Object key) {
-                // Should we populate this list with applet attribute tags?
-                return new ArrayList<Object>();
-            }
-        };
-    }
-
     public ResourcesDesc getResources(final Locale locale, final String os,
                                       final String arch) {
         return new ResourcesDesc(this, new Locale[] { locale }, new String[] { os },
diff -r 41f03d932cdf -r 21183f821dd4 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Mon Jan 09 18:45:31 2012 -0500
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Tue Jan 24 15:33:51 2012 -0500
@@ -205,6 +205,7 @@
 SPrinterAccess=The application has requested printer access. Do you want to allow this action?
 SNetworkAccess=The application has requested permission to establish connections to {0}. Do you want to allow this action?
 SNoAssociatedCertificate=<no associated certificate>
+SUnverified=(unverified)
 SAlwaysTrustPublisher=Always trust content from this publisher
 SHttpsUnverified=The website's certificate cannot be verified.
 SNotAllSignedSummary=Only parts of this application code are signed.
diff -r 41f03d932cdf -r 21183f821dd4 netx/net/sourceforge/jnlp/security/AccessWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	Mon Jan 09 18:45:31 2012 -0500
+++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java	Tue Jan 24 15:33:51 2012 -0500
@@ -104,7 +104,9 @@
         }
 
         try {
-            publisher = file.getInformation().getVendor() != null ? file.getInformation().getVendor() : R("SNoAssociatedCertificate");
+            publisher = file.getInformation().getVendor() != null ? 
+                    file.getInformation().getVendor() + " " + R("SUnverified") : 
+                    R("SNoAssociatedCertificate");
         } catch (Exception e) {
         }
 



More information about the distro-pkg-dev mailing list