Skip to content

Bug 42562: Normalized the Accepted Languages on Android.

Merge Info

Related Issues

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 to tor-browser-specific commits, new features, security backports
  • Merge to base-browser - !fixups to base-browser-specific commits, new features to be shared with mullvad-browser, and security backports
    • NOTE: if your changeset includes patches to both base-browser and tor-browser please clearly label in the change description which commits should be cherry-picked to base-browser after merging

Issue Tracking

Review

Request Reviewer

  • Request review from an applications developer depending on modified system:

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.

Edited by Pier Angelo Vendrame

Merge request reports