Bug 360387: Verify HMAC of safebrowsing updates. r=tony, blocking-firefox3=beltzner

This commit is contained in:
2008-02-27 00:51:02 -08:00
parent 71c3f37a6d
commit d2cd081193
21 changed files with 968 additions and 847 deletions

View File

@@ -131,9 +131,13 @@ PROT_DataProvider.prototype.updateListManager_ = function() {
listManager.setUpdateUrl(this.getUpdateURL());
// setKeyUrl has the side effect of fetching a key from the server.
// This shouldn't happen if anti-phishing is disabled or we're in local
// list mode, so we need to check for that.
var isEnabled = this.prefs_.getPref(kPhishWardenEnabledPref, false);
// This shouldn't happen if anti-phishing/anti-malware is disabled.
var isEnabled = this.prefs_.getPref(kPhishWardenEnabledPref, false) ||
this.prefs_.getPref(kMalwareWardenEnabledPref, false);
if (isEnabled) {
listManager.setKeyUrl(this.keyURL_);
}
listManager.setGethashUrl(this.getGethashURL());
}

View File

@@ -89,8 +89,8 @@ function PROT_MalwareWarden() {
};
try {
dbService_.beginUpdate(listener);
dbService_.beginStream("");
dbService_.beginUpdate(listener, "");
dbService_.beginStream("", "");
dbService_.updateStream(testUpdate);
dbService_.finishStream();
dbService_.finishUpdate();