Opened 4 years ago

Last modified 23 months ago

#16327 assigned defect

NavigatorLanguage API needs a testcase for intl pref

Reported by: mikeperry Owned by: boklm
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-testcase
Cc: gk Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If the user selects to spoof english, we should also spoof the https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage API.

This may already be handled by the intl prefs, but we need to check that.

Child Tickets

Change History (7)

comment:1 Changed 4 years ago by gk

Cc: gk added

comment:2 Changed 4 years ago by arthuredelstein

This is indeed handled by 'intl.accept_languages'. See the code at:
https://dxr.mozilla.org/mozilla-central/source/dom/base/Navigator.cpp#409
I also tested manually and observed that window.navigator.languages always matches the 'intl.accept_languages' pref value.

It would be nice to write a regression test for this. Currently we set intl.accept_languages to en-us, en in tor button when 'extensions.torbutton.resist_fingerprinting' is enabled. It would be possible to write a simple mochitest that sets pref and confirms that it is reflected in navigator.languages. But maybe we should put some unit tests in torbutton itself, to confirm that the settings are as expected? Not sure what the best approach is here.

comment:3 Changed 4 years ago by mikeperry

Keywords: tbb-5.0a TorBrowserTeam201507 added

Tag the set of things we should have implemented before a full 5.0 launch, and add them to the July radar.

comment:4 Changed 4 years ago by mikeperry

Keywords: tbb-5.0a4 added; tbb-5.0a removed

Tag some 5.0a4 goals.

comment:5 Changed 4 years ago by mikeperry

Keywords: tbb-testcase added; tbb-5.0a4 removed
Owner: changed from tbb-team to boklm
Status: newassigned

Actually this just needs a verification testcase. Taking the 5.0a4 tag off and assigning to boklm, since I believe he is the current owner of our pref tests.

comment:6 Changed 4 years ago by mikeperry

Keywords: ff38-esr tbb-fingerprinting TorBrowserTeam201507 removed
Summary: NavigatorLanguage API should be spoofedNavigatorLanguage API needs a testcase for intl pref

comment:7 Changed 23 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.