Replace nsContentUtils::SpoofLocaleEnglish with ShouldResistFingerprinting(RFPTarget::JSLocale)
Categories
(Core :: Privacy: Anti-Tracking, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox140 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
Details
Attachments
(1 external file)
ShouldResistFingerprinting(RFPTarget::JSLocale) already uses the pref privacy.spoof_english under the hood, so I don't think we need the older method.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
test_SVG_switch_language_spoof.html fails now. Are we maybe caching the RFP state?
Comment 3•1 year ago
|
||
I don't think so. Do .html tests run with system principal? nsContentUtils::SpoofLocaleEnglish didn't used to check for principal, maybe aDoc->ShouldResistFingerprinting(RFPTarget::JSLocale) returns false because the doc is chrome?
| Assignee | ||
Comment 4•1 year ago
•
|
||
No, the test isn't running with system principal. The problem is that we actually change the preference intl.accept_languages to English when setting the privacy.spoof_english to 2. It would be nice to remove that code and instead change all users of intl.accept_languages to respect RFPTarget::JSLocale instead.
I worked around this by switching around the order of the test.
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
This patch changes our behavior so that we only respect privacy.spoof_english = 2 when FPP or RFP is enabled. Previously privacy.spoof_english was documented to work in conjunction with RFP, but didn't actually require privacy.resistFingerprinting.
Comment 7•1 year ago
|
||
| bugherder | ||
Comment 8•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #5)
This patch changes our behavior so that we only respect
privacy.spoof_english = 2when FPP or RFP is enabled. Previouslyprivacy.spoof_englishwas documented to work in conjunction with RFP, but didn't actually requireprivacy.resistFingerprinting.
Sorry, probably a bit OT for this Bug, but why is test changing this pref a problem?
I got several test failures I still haven't managed to check because of this in the tests I wrote for my Bug 1666613 patch.
| Assignee | ||
Comment 9•1 year ago
|
||
Sorry, probably a bit OT for this Bug, but why is test changing this pref a problem?
Which pref, do you mean intl.accept_languages or the privacy prefs? For the former it's problematic because when a pref is changed in the background, without e.g. using SpecialPowers.pushPrefEnv, that might influence other tests. In this specific case I think it's also a bit confusing, because it doesn't even seem necessary at first glance.
Comment 10•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #9)
Sorry, probably a bit OT for this Bug, but why is test changing this pref a problem?
Which pref, do you mean
intl.accept_languagesor theprivacyprefs? For the former it's problematic because when a pref is changed in the background, without e.g. usingSpecialPowers.pushPrefEnv, that might influence other tests. In this specific case I think it's also a bit confusing, because it doesn't even seem necessary at first glance.
Yes, I meant intl.accept_languages.
It makes sense, thanks.
Updated•1 year ago
|
Description
•