[rfc][icedtea-web] Ignore invalid .jar files in applets [resubmit]

Adam Domurad adomurad at redhat.com
Mon Jun 18 07:42:02 PDT 2012


Hey all, re-submitting my patch, as Jiri requested.

ChangeLog:
2012-05-28  Adam Domurad <adomurad at redhat.com>

	Ignore invalid jar files in applets, like the oracle plugin does.
	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: 
	(isInvalidJar): New, checks for ZipException in new JarFile(...)
	(shouldFilterInvalidJars): New, checks if we are in an applet
	(initializeResources): if 'shouldFilterInvalidJars()' is true and a jar
	is not a valid jar file, the jar is filtered out and normal execution 
	continues.



On Mon, 2012-05-28 at 15:26 -0400, Adam Domurad wrote:
> Hey all. Second try at a patch to ignore invalid .jar files, this time
> only affecting applets (ie, not pages that use jnlp_href).
> 
> The proprietary plug-in seems to just skip over any malformed .jar files
> and carry on loading in, while in applets. This patch emulates that
> behaviour. Pages with jnlp_href still crash with a ZipException on jar
> verification (the proprietary plugin also fatally errors).
> 
> This alleviates some of the symptoms of
> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1011 
> Once this patch has been accepted in some form, I hope to make it so
> that the plugin will parse folders differently than jar files and look
> for resources in folders like the proprietary plug-in does.
> 
> Le ChangeLog:
> 2012-05-28  Adam Domurad <adomurad at redhat.com>
> 
> 	Ignore invalid jar files in applets, like the oracle plugin does.
> 	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: 
> 	(isValidJar): New, checks for ZipException in new JarFile(...)
> 	(shouldIgnoreInvalidJars): New, checks if we are in an applet
> 	(initializeResources): if 'shouldIgnoreInvalidJars()' is true and a jar
> 	is not a valid jar file, the jar is filtered out and normal execution 
> 	continues.
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-attempt-3.patch
Type: text/x-patch
Size: 3811 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120618/baecf85f/patch-attempt-3.patch 


More information about the distro-pkg-dev mailing list