Webapps.jsm attempts to throw APP_PACKAGE_CORRUPTED

RESOLVED FIXED in Firefox 29

Status

P3
normal
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: onecyrenus, Assigned: marco)

Tracking

unspecified
Firefox 29
x86
Mac OS X

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 1

5 years ago
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
(Assignee)

Comment 2

5 years ago
Created attachment 8346822 [details] [diff] [review]
Patch

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+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/b2g-inbound/rev/2e309e56443c
Assignee: nobody → mar.castelluccio
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2e309e56443c
Status: NEW → RESOLVED
Last Resolved: 5 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.