зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1431192 - Only fetch download protection lists when Safe Browsing is enabled. r=gcp
Download protection requires both the malware list as well as its own special lists. The code therefore checks that both Safe Browsing and download protection are enabled before checking downloaded files. The list manager should check the same prefs before downloading any of the download protection lists in order to avoid connecting to the Safe Browsing server when Safe Browsing is fully disabled. MozReview-Commit-ID: 66vMA56T4pJ --HG-- extra : rebase_source : cef14cf5a03290bd10d8d02367709e1ffd5e9030
This commit is contained in:
Родитель
21fb2aec25
Коммит
e6be1157ca
|
@ -405,14 +405,14 @@ this.SafeBrowsing = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.downloadBlockLists.length; ++i) {
|
for (let i = 0; i < this.downloadBlockLists.length; ++i) {
|
||||||
if (this.downloadsEnabled) {
|
if (this.malwareEnabled && this.downloadsEnabled) {
|
||||||
listManager.enableUpdate(this.downloadBlockLists[i]);
|
listManager.enableUpdate(this.downloadBlockLists[i]);
|
||||||
} else {
|
} else {
|
||||||
listManager.disableUpdate(this.downloadBlockLists[i]);
|
listManager.disableUpdate(this.downloadBlockLists[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.downloadAllowLists.length; ++i) {
|
for (let i = 0; i < this.downloadAllowLists.length; ++i) {
|
||||||
if (this.downloadsEnabled) {
|
if (this.malwareEnabled && this.downloadsEnabled) {
|
||||||
listManager.enableUpdate(this.downloadAllowLists[i]);
|
listManager.enableUpdate(this.downloadAllowLists[i]);
|
||||||
} else {
|
} else {
|
||||||
listManager.disableUpdate(this.downloadAllowLists[i]);
|
listManager.disableUpdate(this.downloadAllowLists[i]);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче