Save page corrupts name of Java applet class

Bug #217299 reported by Heiko Selber
2
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Ubuntu)
Won't Fix
Undecided
Unassigned
firefox-3.0 (Ubuntu)
Invalid
Undecided
Unassigned
xulrunner-1.9 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: firefox

I saved a web page with an applet, e.g. http://www.selber.org/Applets/Mondrian.html with firefox (3.0~b5+nobinonly-0ubuntu1) in a freshly installed (and updated) Hardy Heron 8.04 Beta.

In the saved file, the CODE attribute of the APPLET tag was changed from

CODE="org.selber.graphics.Mondrian.class"

to

CODE="Mondrian_files/org.html".

This is not a Java class, therefore the applet fails to run when the saved page is opened with firefox.

Apparently the class name is misunderstood as a file name and modified in order to point to a name in the local directory.

This must not be done if the ARCHIVE attribute is given so that CODE points to a class in the archive, which doesn't change when saved.

Revision history for this message
In , Heiko Selber (heiko-selber) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5

When I save a web page with an applet which uses packages and is in a jar, the class of the applet is replaced by a link to a non-existing file which contans a 404 error message.

Reproducible: Always

Steps to Reproduce:
1. Save a web page with an applet, e.g.

http://www.selber.org/Applets/Mondrian.html

Actual Results:

In the saved file, the CODE attribute of the APPLET tag was changed from

CODE="org.selber.graphics.Mondrian.class"

to

CODE="Mondrian_files/org.html".

This is not a Java class, therefore the applet fails to run when the saved page is opened with firefox.

Apparently the class name is misunderstood as a file name and modified in order to point to a name in the local directory.

This must not be done if the ARCHIVE attribute is given so that CODE points to a class in the archive, which doesn't change when saved.

Expected Results:
The CODE attribute should not be changed:

CODE="org.selber.graphics.Mondrian.class"

I observed the bug with 3.0b5 on Ubuntu Linux 8.04 and with 2.0.0.14 on Windows XP.

I reported this to Ubuntu as

https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/217299

Revision history for this message
Heiko Selber (heiko-selber) wrote :

I reported this bug to Mozilla directly:

https://bugzilla.mozilla.org/show_bug.cgi?id=430283

Revision history for this message
In , Mats Palmgren (matspal) wrote :

FWIW, there's some slightly related background info in bug 276453.

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Created attachment 317237
Patch rev. 1

This fixes it for the URL in this bug. I'm simply assuming that if there
is an 'archive' attribute the 'code' class is included. I don't think
that's required by HTML4 though:
http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.4
but I would guess it's true for the vast majority of pages using
'archive', but I could be wrong.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 217299] Re: Save page corrupts name of Java applet class

On Tue, Apr 22, 2008 at 03:13:28PM -0000, Heiko Selber wrote:
> I reported this bug to Mozilla directly:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=430283
>

Thanks. As there appears to be a patch available already, I confirm
this as triaged for xulrunner-1.9 as thats the place where the
affected code ships.

 affects ubuntu/xulrunner-1.9
 status triaged

... invalidating ffox 3 part accordingly ...

 affects ubuntu/firefox-3.0
 status invalid

 - Alexander

Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

ffox 2 wont see a fix most likely.

Changed in firefox:
status: New → Won't Fix
Revision history for this message
In , Mats Palmgren (matspal) wrote :
Changed in firefox:
status: Confirmed → Fix Released
Changed in firefox:
importance: Unknown → Medium
Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in xulrunner-1.9 (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.