Bug 360387: Verify HMAC of safebrowsing updates. r=tony, blocking-firefox3=beltzner
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user