Closed Bug 602332 Opened 14 years ago Closed 14 years ago

XPIProvider incorrectly checks hash of local file

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

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
A patch to fix this is in bug 593535
Depends on: 593535
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
Backed out due to test failures
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Bug 593535 was relanded, so this is fixed.
Assignee: nobody → dtownsend
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
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.