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.