[rfc][icedtea-web] Reproducer for: Ignore invalid .jar files in applets
Adam Domurad
adomurad at redhat.com
Fri Jun 1 07:45:21 PDT 2012
Here's is a reproducer for the previous patch (which still needs a
reviewer btw).
ChangeLog:
2012-06-01 Adam Domurad <adomurad at redhat.com>
*
tests/jnlp_tests/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.html:
*
tests/jnlp_tests/simple/AppletReadsInvalidJar/resources/AppletReadsInvalidJar.jnlp:
* tests/jnlp_tests/simple/AppletReadsInvalidJar/srcs/Valid.java:
*
tests/jnlp_tests/simple/AppletReadsInvalidJar/testcases/AppletReadsInvalidJarTests.java:
Reproducer for checking behaviour of existing but invalid (corrupt,
etc) jar files in .jnlp files (should fail) and applet tags (should be
ignored)
On Mon, 2012-05-28 at 16:23 -0400, Adam Domurad wrote:
> The original patch actually errors when passed a .jar file that simply
> does not exist. This is a better patch.
>
> 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: ignore-invalid-jar-files-reproducers.patch
Type: text/x-patch
Size: 10537 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120601/686a7004/ignore-invalid-jar-files-reproducers.patch
More information about the distro-pkg-dev
mailing list