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

fixup! Bug 40309: Avoid using regional OS locales

Bug 42349: Change the RFPTarget in the region spoofing.

One of our patches makes sure that when spoof English is not in use, we
report the same locale as the app language, instead of reporting the OS
locale (which is Firefox's default behavior when the app and OS
languages are the same).

When rebasing onto 128, we broke this patch because we had to specify
an RFPTarget, and I chose RFPTarget::JSLocale.
This is the only target that can be disabled even when running RFP
instead of FFP, because it is controlled by privacy.spoof_english.
parent 292271b7
Branches
Tags
1 merge request!1080Bug 42349: Workaround to fix the leak of regional locales
......@@ -485,10 +485,12 @@ 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::JSLocale)) {
RFPTarget::JSDateTimeUTC)) {
GetAppLocalesAsBCP47(aRetVal);
return NS_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment