Bug 280666
| Summary: | Add Quirks for changing the navigator.Language because of fingerprinting for logging | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | WebKit Misc. | Assignee: | Karl Dubost <karlcow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://bestbuy.com/ | ||
| Bug Depends on: | |||
| Bug Blocks: | 280667 | ||
Karl Dubost
When a user is trying to log in on the bestbuy.com website
with Safari set as Japanese (Accept-Language: ja) or French-France (Accept-Language: fr-FR),
the login is not working.
While at the same time this is working for Chrome and Firefox.
Also some other languages will be accepted, even things such as French-Canada
Safari:
PASS Accept-Language: en-US,en;q=0.9
PASS Accept-Language: pt-BR,pt;q=0.9
PASS Accept-Language: fr-CA,fr;q=0.9
FAIL Accept-Language: fr-FR,fr;q=0.9
FAIL Accept-Language: ja
Firefox:
PASS Accept-Language: en-US,en;q=0.8,fr-FR;q=0.5,ja;q=0.3
PASS Accept-Language: fr-FR
PASS Accept-Language: ja
We also tried with Safari and overriding the User-Agent to be Firefox.
Not working:
* Accept-Language: ja
* User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0
And it fails on Firefox with a Safari UA override.
* Accept-Language: fr-FR
* User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15
bestbuy.com doesn't send a spanish speaking version of the site to users with
Accept-Language: es-US,es-419;q=0.9,es;q=0.8
So we can probably test a Accept-Language override in English without issues.
In parallel, an outreach effort will be started to contact Best Buy
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
<rdar://136235936>
Karl Dubost
Outreach effort at https://github.com/webcompat/web-bugs/issues/142261
Karl Dubost
I initially though it was Accept-Language, but that's more complex.
There is language detection everywhere on the client side.
So one solution would be to override the navigator.Language.
Karl Dubost
Override navigator.language and navigator.languages to return English values for bestbuy.com. This:
Fixes the getBrowserLocale() call returning "ja" → now returns "en-US"
Fixes the environment initialization matching "en-US" correctly
Fixes the fingerprint hash including the correct language value
Fixes all downstream navigator.language reads (analytics, device info, etc.)
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/62170
EWS
Committed 310760@main (8655616b4d00): <https://commits.webkit.org/310760@main>
Reviewed commits have been landed. Closing PR #62170 and removing active labels.