xpinstall is overly cautious about xpi integrity

RESOLVED FIXED

Status

Core Graveyard
Installer: XPInstall Engine
--
minor
RESOLVED FIXED
11 years ago
2 years ago

People

(Reporter: mossop, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
Not really a bug but an issue where xpinstall is just doing more work than necessary to be sure that the downloaded xpi is intact. Putting here for reference for the time being. It goes through the following process:

Call OpenAndValidateArchive to check the CRC of every entry in the xpi.
Check the CRC of just install.rdf.
Call the EM which extracts install.rdf (performing an implicit CRC check).
A lot of those checks came from the era of getting a lot of corrupt downloads over dial-up lines. Yes, each file is re-checked when extracted, but it's better to know up front and bail out if something is bad rather than get halfway into it and have to unwind. Especially if it's an old-style install.js script that does more than simple unpacking of the archive.

The middle check of install.rdf sounds redundant though. Are you sure it's checking that specifically or just checking for existence to know whether or not to ship the .xpi over to the EM?
(Reporter)

Comment 2

11 years ago
Yes it's calling Test when we could easily reduce it to HasEntry.
(Reporter)

Comment 3

10 years ago
Fixed as far as I'm concerned by bug 406807
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.