Skip to content
Snippets Groups Projects
Commit e6fc74b4 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

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.
parent f8522ab7
No related branches found
No related tags found
1 merge request!1462BB/TB 43584: Rebased stable again onto 128.9.0esr build2
......@@ -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"
......@@ -484,6 +485,16 @@ LocaleService::GetAppLocaleAsBCP47(nsACString& aRetVal) {
NS_IMETHODIMP
LocaleService::GetRegionalPrefsLocales(nsTArray<nsCString>& aRetVal) {
// tor-browser#42349, #42771: We cannot use JSLocale because it is spoof
// English. So, we use another target for now.
if (nsContentUtils::ShouldResistFingerprinting(
"This is probably a patch that should be refined. But to get the "
"build going, we just keep applying this generic check.",
RFPTarget::JSDateTimeUTC)) {
GetAppLocalesAsBCP47(aRetVal);
return NS_OK;
}
bool useOSLocales =
Preferences::GetBool("intl.regional_prefs.use_os_locales", false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment