Closed Bug 917673 Opened 11 years ago Closed 11 years ago

Webapps.jsm attempts to throw APP_PACKAGE_CORRUPTED

Categories

(Firefox Graveyard :: Web Apps, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: onecyrenus, Assigned: marco)

Details

Attachments

(1 file)

I believe Webapps.jsm is throwing APP_PACKAGE_CORRUPTED in a scenario that is highly unlikely. -> NS_ERROR_FILE_CORRUPTED

http://dxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#l2609

It is probably better to attach to any/all of the following: 
NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY
NS_ERROR_SIGNED_JAR_ENTRY_INVALID
NS_ERROR_SIGNED_JAR_ENTRY_MISSING

NS_ERROR_FILE_CORRUPTED only seems to be thrown if the size of the signature file is over 1MB. or something thereabouts.
This is semantics, but INVALID_SIGNATURE seems to imply that the signature itself has been incorrectly applied, whereas something like APP_PACKAGE_CORRUPTED implies that the package contents itself has been changed, something of the nature APP_PACKAGE_INVALID, could correctly convey the right meaning. 

From outside perspective INVALID / APP_PACKAGE_CORRUPTED aren't really tied to a semantic meaning, the error code APP_SIGNATURE_TOO_LARGE, would probably provide further insight as to what had happened.
Priority: -- → P3
Attached patch PatchSplinter Review
I think this could be a good distinction.
APP_PACKAGE_CORRUPTED when the JAR has been corrupted.
APP_PACKAGE_INVALID when the JAR is invalid.
Attachment #8346822 - Flags: review?(fabrice)
Attachment #8346822 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2e309e56443c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: