aboutsummaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1431192
blob: 3409a299dc248043e8f6dbecc7cb6ee6a331559e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
commit f953dbadab3f
Author: Francois Marier <francois@mozilla.com>
Date:   Mon Jan 29 15:16:54 2018 -0800

    Bug 1431192 - Only fetch download protection lists when Safe Browsing is enabled. r=gcp, a=RyanVM
    
    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 : source : 79905d4e85aba22cafcd8f331b06197134267975
---
 toolkit/components/url-classifier/SafeBrowsing.jsm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git toolkit/components/url-classifier/SafeBrowsing.jsm toolkit/components/url-classifier/SafeBrowsing.jsm
index 73bd04dafcf9..64b8dd35de03 100644
--- toolkit/components/url-classifier/SafeBrowsing.jsm
+++ toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -405,14 +405,14 @@ this.SafeBrowsing = {
       }
     }
     for (let i = 0; i < this.downloadBlockLists.length; ++i) {
-      if (this.downloadsEnabled) {
+      if (this.malwareEnabled && this.downloadsEnabled) {
         listManager.enableUpdate(this.downloadBlockLists[i]);
       } else {
         listManager.disableUpdate(this.downloadBlockLists[i]);
       }
     }
     for (let i = 0; i < this.downloadAllowLists.length; ++i) {
-      if (this.downloadsEnabled) {
+      if (this.malwareEnabled && this.downloadsEnabled) {
         listManager.enableUpdate(this.downloadAllowLists[i]);
       } else {
         listManager.disableUpdate(this.downloadAllowLists[i]);