[tor-commits] [tor-browser] 35/70: Bug 40309: Avoid using regional OS locales
    gitolite role 
    git at cupani.torproject.org
       
    Tue Aug  9 10:53:09 UTC 2022
    
    
  
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-102.0.1-12.0-1
in repository tor-browser.
commit d3af1a22302ae41a5c774dda99a204d7d1d2a3f5
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Wed May 18 19:22:37 2022 +0200
    Bug 40309: Avoid using regional OS locales
    
    Avoid regional OS locales if the pref
    `intl.regional_prefs.use_os_locales` is false but RFP is enabled.
---
 intl/locale/LocaleService.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/intl/locale/LocaleService.cpp b/intl/locale/LocaleService.cpp
index 4ff18a1a90c4a..542eed3e37fdb 100644
--- a/intl/locale/LocaleService.cpp
+++ b/intl/locale/LocaleService.cpp
@@ -14,6 +14,7 @@
 #include "mozilla/intl/AppDateTimeFormat.h"
 #include "mozilla/intl/Locale.h"
 #include "mozilla/intl/OSPreferences.h"
+#include "nsContentUtils.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIObserverService.h"
@@ -479,6 +480,11 @@ LocaleService::GetAppLocaleAsBCP47(nsACString& aRetVal) {
 
 NS_IMETHODIMP
 LocaleService::GetRegionalPrefsLocales(nsTArray<nsCString>& aRetVal) {
+  if (nsContentUtils::ShouldResistFingerprinting()) {
+    GetAppLocalesAsBCP47(aRetVal);
+    return NS_OK;
+  }
+
   bool useOSLocales =
       Preferences::GetBool("intl.regional_prefs.use_os_locales", false);
 
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the tor-commits
mailing list