Bug 42562: Normalized the Accepted Languages on Android.
Merge Info
Related Issues
- #42562 (closed)
- mullvad-browser#xxxxx
- tor-browser-build#xxxxx
Backporting
Timeline
-
Immediate: patchset needed as soon as possible -
Next Minor Stable Release: patchset that needs to be verified in nightly before backport -
Eventually: patchset that needs to be verified in alpha before backport -
No Backport (preferred): patchset for the next major stable
@richard your call here about the timeline
(Optional) Justification
-
Emergency security update: patchset fixes CVEs, 0-days, etc -
Censorship event: patchset enables censorship circumvention -
Critical bug-fix: patchset fixes a bug in core-functionality - This commit makes TBA stop revealing regional preferences (when spoof English is off)
-
Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc -
Sponsor required: patchset required for sponsor -
Localization: typos and other localization changes that should be also in the release branch -
Other: please explain
Merging
-
Merge to tor-browser
-!fixups
totor-browser
-specific commits, new features, security backports -
Merge to base-browser
-!fixups
tobase-browser
-specific commits, new features to be shared withmullvad-browser
, and security backports-
NOTE: if your changeset includes patches to both
base-browser
andtor-browser
please clearly label in the change description which commits should be cherry-picked tobase-browser
after merging
-
NOTE: if your changeset includes patches to both
Issue Tracking
-
Link resolved issues with appropriate Release Prep issue for changelog generation
Review
Request Reviewer
-
Request review from an applications developer depending on modified system: - android : @clairehurst, @dan: for the Java part
- security : @ma1 for the approach
Change Description
When spoof English is off, TBA will leak your region (e.g., en-IN for English/India, es-US for Spanish/US).
This MR reverts our previous (not so effective) patch, and adds a new patch that allows a locale to pass only if we bundle its translation.
As a fallback, we try to match by language (e.g., match es-US to es-ES, rather than en-US).
When everything fails, we use en-US.
Notice that Mozilla Firefox doesn't have the language-only fallbacks, such as en. So, I'm matching the behavior, and adding only the locale with the regional information.
A patch on the firefox-android side is needed to pass the languages we actually support.
How Tested
Custom nightly build: https://tb-build-03.torproject.org/~pierov/torbrowser/nightly/tbb-nightly.2024.05.08/
I tested with my emulator set to en-IN, and noticed TZP says I have en-US.
Merge request reports
Activity
requested review from @ma1
assigned to @pierov
mentioned in merge request firefox-android!92 (merged)
- Resolved by ma1
When everything fails, we use en-US.
Notice that Mozilla Firefox doesn't have the language-only fallbacks, such as en. So, I'm matching the behavior, and adding only the locale with the regional information.
I've tested a thing again... And noticed that RFP will set en-US, en for you.
So, we might want to set en at least as a special case when you're only en-US to prevent from telling real en-US users from spoof English users.
added 1 commit
- adcc0010 - Bug 42562: Normalized the Accepted Languages on Android.
added 1 commit
- b70e3ebd - Bug 42562: Normalized the Accepted Languages on Android.
- Resolved by Pier Angelo Vendrame
Android Team, how does the Java look like?
added 8 commits
-
b70e3ebd...66e2e3ef - 6 commits from branch
tpo/applications:tor-browser-115.11.0esr-13.5-1
- 83a3762f - fixup! Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView
- e6f7f151 - Bug 42562: Normalized the Accepted Languages on Android.
-
b70e3ebd...66e2e3ef - 6 commits from branch
marked this merge request as draft from pierov/tor-browser@83a3762f
Backported as eb5afe56+970e6b90 (TB), c350d2c1bf63ebec7433f1e09138737614b68178+fd72ec1032fbe468894dadbf16e950d80e8ca85c (BB), mullvad-browser@16ff0199+mullvad-browser@9d8bcd60.
mentioned in merge request tor-browser-build!966 (merged)
mentioned in issue #42582 (closed)