Closed Bug 338611 Opened 19 years ago Closed 19 years ago

xpinstall manager happily tries to install 404 pages

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: darin.moz, Assigned: darin.moz)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

xpinstall manager happily tries to install 404 pages nsIXPInstallManager::InitManagerFromChrome will try to install URLs that return 404 errors. It should verify that the HTTP response is a success code before attempting to install the file. It eventually does fail, but only down deep in the JAR code when the nsZipArchive barfs about the file not being a valid ZIP archive. I think the problem should be caught in nsXPInstallManager::OnStartRequest.
Attached patch v1 patchSplinter Review
This does the trick.
Assignee: xpi-engine → darin
Status: NEW → ASSIGNED
Attachment #222704 - Flags: review?(dveditz)
Target Milestone: --- → mozilla1.9alpha
Priority: -- → P2
Comment on attachment 222704 [details] [diff] [review] v1 patch Looks good, r=dveditz. OK for ff2 if you want it. > rv = NS_NewLocalFileOutputStream(getter_AddRefs(mItem->mOutStream), > mItem->mFile, > PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, > 0664); Would you mind fixing this typo while you're there? The file mode should be 0644
Attachment #222704 - Flags: superreview+
Attachment #222704 - Flags: review?(dveditz)
Attachment #222704 - Flags: review+
Attachment #222704 - Flags: approval-branch-1.8.1+
You meant that it "should _not_ be 0644", right? 0600 is the best choice, I think.
fixed-on-trunk and fixed1.8.1 w/ switch from 0644 to 0600 in both OnStartRequest and GetDestination (NOT_CHROME case).
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I discussed those permission changes with dveditz over AIM.
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: