Can't load applet in a signed webpage

RESOLVED WONTFIX

Status

()

Core
Plug-ins
RESOLVED WONTFIX
14 years ago
7 months ago

People

(Reporter: Kyle Yuan, Assigned: Pete Zha)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
I have not found where the problem is. Will transfer to the proper component
once I found the real cause.

As described in
http://www.mozilla.org/projects/security/components/signed-scripts.html, to
signed a javascript, you must signed the entire html page the js belongs to, as
well as all resources (e.g. images, applets) this html page refers to. Also to
access the signed html page, you must use url like this:
jar:http://www.site.com/myjar.jar!/signed.html

But if I jar-ed a html page, a gif image, a js source file and an applet
(.class) into one jar and signed it. Access this page using jar://http://blabla,
I got this exception in Java Console.

Caused by: java.io.IOException: unexpected EOF
	at sun.applet.AppletClassLoader.getBytes(Unknown Source)
	at sun.applet.AppletClassLoader.access+100(Unknown Source)
	at sun.applet.AppletClassLoader+1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 10 more

The js file & gif image work fine.
(Reporter)

Comment 1

14 years ago
Additional information by setting trace level to 5:

<snip>
network: Connecting http://putt.prc/test/security/myapp.jar with proxy=HTTP ...
network: Connecting http://putt.prc/test/security/myapp.jar with cookie " "
load: class Cat not found.
java.lang.ClassNotFoundException: Cat
	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:164)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
<snip>

Seems java considers myapp.jar should only consist of some class files, but in
fact, myapp.jar has html, js, gif and class all together.
(Reporter)

Comment 2

14 years ago
Created attachment 143078 [details]
testcase - warning: the applet in this test case may read/write/execute the files in your local file systems

Updated

12 years ago
Assignee: yuanyi21 → pete.zha
QA Contact: plugins

Updated

7 months ago
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.