Closed Bug 565339 Opened 15 years ago Closed 15 years ago

Firefox creating invalid moz-icon URI, causes problem in save file dialog

Categories

(Firefox :: File Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.7a5

People

(Reporter: jaas, Assigned: Gavin)

References

Details

Attachments

(1 file)

Bug 559496 is about a crash that happens because our moz-icon code returns a 23,000 character file extension, which we ask Mac OS X about, and Mac OS X gets angry. I have a fix for that crash and the moz-icon issues in bug 559496. However - the original problem is that some code in Firefox is attempting to create an invalid moz-icon URI object. moz-icon URI strings can be in 3 forms: Icon URI path can have three forms: (1) //stock/<icon-identifier> (2) //<some dummy file with an extension> (3) a valid URL The bad moz-icon URI is of the form: moz-icon://application/vnd.ms-excel;base64,PHhtbCB2ZXJzaW9uPSIxLjAiI... which parses as a dummy file name with an extension. Obviously this is not a file name. Whatever is creating this moz-icon URI string should be fixed.
Depends on: 559496
Attached patch patchSplinter Review
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #444926 - Flags: review?(neil)
This patch works for me, it stops the crash even without my lower-level fix in bug 559496. Thanks Gavin!
Attachment #444926 - Flags: review?(neil) → review+
Flags: in-testsuite-
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
I think we should take this patch on the 1.9.2 branch and 1.9.1 if it is relevant. This is a simple way to avoid the crash, I don't really want to try to take my bigger patch back.
Given that moz-icon is content-accessible (as demonstrated by <crashtestcase> attachment 445165 [details] </crashtestcase>), I think we should fix the underlying issue on branches as well.
My patch on bug 559496 applies with no conflicts on 1.9.2 and the tests pass. The only significant behavioral change is additive - we allow any URL instead of just file URLs. So maybe we can take both patches on 1.9.2 without any changes.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: