[tbb-commits] [tor-browser/tor-browser-60.1.0esr-8.0-1] Bug 1459089 - Don't use OS Locale when resistFingerprinting is enabled. When the OS Locale is used, it leaks the OS language in the HTTP Accept-Language header. r=mcomella

gk at torproject.org gk at torproject.org
Mon Jul 30 11:49:58 UTC 2018


commit d352f450f3edd120df9b7ab973db45069ef22bb2
Author: Igor Oliveira <igt0 at torproject.org>
Date:   Thu May 3 18:28:00 2018 +0300

    Bug 1459089 - Don't use OS Locale when resistFingerprinting is enabled. When the OS Locale is used, it leaks the OS language in the HTTP Accept-Language header. r=mcomella
    
    --HG--
    extra : rebase_source : 7b0dc69be25c5076696a6bd9db7611cd5b0abbad
---
 mobile/android/chrome/content/browser.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js
index 2dc973a15ee7..d081fde9b20e 100644
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2147,6 +2147,13 @@ var BrowserApp = {
       appLocale = appLocale.toLowerCase();
     }
 
+    try {
+        const resistFingerprinting = Services.prefs.getBoolPref("privacy.resistFingerprinting");
+        if (resistFingerprinting) {
+          osLocale = null;
+        }
+    } catch (e) {}
+
     if (osLocale) {
       osLocale = osLocale.toLowerCase();
     }



More information about the tbb-commits mailing list