Pier Angelo Vendrame pushed to branch mullvad-browser-153.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

2 changed files:

Changes:

  • browser/components/ProfileDataUpgrader.sys.mjs
    ... ... @@ -1040,7 +1040,8 @@ export let ProfileDataUpgrader = {
    1040 1040
         // Version 4: 15.0a2: Drop ML components. tor-browser#44045.
    
    1041 1041
         // Version 5: 15.0a3: Disable LaterRun using prefs. tor-browser#42630.
    
    1042 1042
         // Version 6: 15.0a4: Reset browser colors. tor-browser#43850.
    
    1043
    -    const MIGRATION_VERSION = 6;
    
    1043
    +    // Version 7: 16.0a10: Reset safe browsing preferences. tor-browser#44802.
    
    1044
    +    const MIGRATION_VERSION = 7;
    
    1044 1045
         const MIGRATION_PREF = "basebrowser.migration.version";
    
    1045 1046
     
    
    1046 1047
         if (isNewProfile) {
    
    ... ... @@ -1138,6 +1139,21 @@ export let ProfileDataUpgrader = {
    1138 1139
             }
    
    1139 1140
           }
    
    1140 1141
         }
    
    1142
    +    if (currentVersion < 7) {
    
    1143
    +      // Clear these preferences since:
    
    1144
    +      // + They aren't expected to work.
    
    1145
    +      // + We are hiding the UI to change these. tor-browser#44802.
    
    1146
    +      for (const prefName of [
    
    1147
    +        "browser.safebrowsing.phishing.enabled",
    
    1148
    +        "browser.safebrowsing.malware.enabled",
    
    1149
    +        "browser.safebrowsing.downloads.enabled",
    
    1150
    +        "browser.safebrowsing.downloads.remote.block_uncommon",
    
    1151
    +        "browser.safebrowsing.downloads.remote.block_potentially_unwanted",
    
    1152
    +        "urlclassifier.malwareTable",
    
    1153
    +      ]) {
    
    1154
    +        Services.prefs.clearUserPref(prefName);
    
    1155
    +      }
    
    1156
    +    }
    
    1141 1157
         Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
    
    1142 1158
       },
    
    1143 1159
     
    

  • browser/components/preferences/config/privacy.mjs
    ... ... @@ -2424,6 +2424,8 @@ Preferences.addSetting({
    2424 2424
     Preferences.addSetting({
    
    2425 2425
       id: "enableSafeBrowsing",
    
    2426 2426
       deps: ["enableSafeBrowsingPhishing", "enableSafeBrowsingMalware"],
    
    2427
    +  // Does not work in Tor Browser. tor-browser#44802.
    
    2428
    +  visible: () => false,
    
    2427 2429
       get: (_value, deps) => {
    
    2428 2430
         return (
    
    2429 2431
           deps.enableSafeBrowsingPhishing.value &&
    
    ... ... @@ -2453,12 +2455,8 @@ Preferences.addSetting(
    2453 2455
           uncommonDownloads:
    
    2454 2456
             "browser.safebrowsing.downloads.remote.block_potentially_unwanted",
    
    2455 2457
         },
    
    2456
    -    ({ malware, phishing, downloads, unwantedDownloads, uncommonDownloads }) =>
    
    2457
    -      (!malware.value && !malware.locked) ||
    
    2458
    -      (!phishing.value && !phishing.locked) ||
    
    2459
    -      (!downloads.value && !downloads.locked) ||
    
    2460
    -      (!unwantedDownloads.value && !unwantedDownloads.locked) ||
    
    2461
    -      (!uncommonDownloads.value && !uncommonDownloads.locked),
    
    2458
    +    // Does not work in Tor Browser. tor-browser#44802.
    
    2459
    +    () => false,
    
    2462 2460
         true
    
    2463 2461
       )
    
    2464 2462
     );