[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 39/85: Bug 40309: Avoid using regional OS locales



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-91.9.0esr-11.5-2
in repository tor-browser.

commit 3f28b38a3ffb6f360b503523c9127fd989f70c9d
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
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 022d41cab2e2d..accf0ef75d168 100644
--- a/intl/locale/LocaleService.cpp
+++ b/intl/locale/LocaleService.cpp
@@ -13,6 +13,7 @@
 #include "mozilla/StaticPrefs_privacy.h"
 #include "mozilla/intl/MozLocale.h"
 #include "mozilla/intl/OSPreferences.h"
+#include "nsContentUtils.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIObserverService.h"
@@ -442,6 +443,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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits