Closed
Bug 602332
Opened 14 years ago
Closed 14 years ago
XPIProvider incorrectly checks hash of local file
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla2.0b8
People
(Reporter: Mardak, Assigned: mossop)
References
Details
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#4130
1) nsICryptoHash needs to be initialized first with some hashing algorithm type, e.g., nsICryptoHash.SHA1 (should probably check the algorithm specified in the hash passed in)
2) nsICryptoHash.finish(true) returns base64 encoded data so comparing hash != this.hash will always fail as this.hash looks like "sha1:1a2b3c" hex value.
For 1, existing code does initWithString from onStartRequest:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#4656
For 2, there's existing code for converting binary to hex onStopRequest:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#4720
Assignee | ||
Comment 2•14 years ago
|
||
Fixed by the patch in bug 593535
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Assignee | ||
Comment 3•14 years ago
|
||
Backed out due to test failures
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 4•14 years ago
|
||
Bug 593535 was relanded, so this is fixed.
Assignee: nobody → dtownsend
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Comment 5•14 years ago
|
||
As bug 593535 has been verified, this bug was part of the verification routine. so marking as verified fixed.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•