Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
d72334fd
Commit
d72334fd
authored
Sep 11, 2023
by
ma1
Committed by
Pier Angelo Vendrame
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
BB 42084: Ensure English spoofing works even if preferences are set out of order.
parent
bf80120a
No related branches found
No related tags found
1 merge request
!1500
TB 43415: Rebased onto 134.0a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
+7
-0
7 additions, 0 deletions
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
with
7 additions
and
0 deletions
toolkit/components/resistfingerprinting/RFPHelper.sys.mjs
+
7
−
0
View file @
d72334fd
...
...
@@ -64,6 +64,9 @@ class _RFPHelper {
// Add RFP and Letterboxing observers if prefs are enabled
this
.
_handleResistFingerprintingChanged
();
this
.
_handleLetterboxingPrefChanged
();
// Synchronize language preferences if accidentally messed up (tor-browser#42084)
this
.
_handleSpoofEnglishChanged
();
}
uninit
()
{
...
...
@@ -116,6 +119,7 @@ class _RFPHelper {
this
.
_handleResistFingerprintingChanged
();
break
;
case
kPrefSpoofEnglish
:
case
"
intl.accept_languages
"
:
this
.
_handleSpoofEnglishChanged
();
break
;
case
kPrefLetterboxing
:
...
...
@@ -162,6 +166,7 @@ class _RFPHelper {
}
_handleSpoofEnglishChanged
()
{
Services
.
prefs
.
removeObserver
(
"
intl.accept_languages
"
,
this
);
switch
(
Services
.
prefs
.
getIntPref
(
kPrefSpoofEnglish
))
{
case
0
:
// will prompt
// This should only happen when turning privacy.resistFingerprinting off.
...
...
@@ -174,6 +179,8 @@ class _RFPHelper {
break
;
case
2
:
// spoof
Services
.
prefs
.
setCharPref
(
"
intl.accept_languages
"
,
"
en-US, en
"
);
// Ensure spoofing works if preferences are set out of order
Services
.
prefs
.
addObserver
(
"
intl.accept_languages
"
,
this
);
break
;
default
:
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment