Page MenuHomePhabricator

CheckUser displays low-entropy client hints for login actions by Android devices running Chrome
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Log in to Wikipedia using an Android device and the latest Chrome version (135)
  • Run CheckUser on the account that logged in
  • Examine the Client Hint

What happens?:

  • CU displays platform ("Android"), major version (135), and mobile boolean information for the login action

What should have happened instead?:

  • CU displays mobile device model string, platform and version ("Android XX"), precise version (135.xxxx...), and mobile boolean information for the login action

Additional Information:

  • Testing was performed on enwiki, with the login being performed via the new auth.wikimedia.org domain introduced by SUL3.
  • I imagine this is an SUL3 teething issue, though if I understand T385572#10558044 and T381223 correctly, it's not an expected one.
  • Edit actions are unaffected. An Android/Chrome 135 device that logs in and performs an edit will show up with two different client hints in the CU table: One low-entropy (the login), one high-entropy (the edit).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The issue seems to be that onSpecialPageBeforeExecute sets the relevant Accept-CH headers, but then those are immediately unset in onBeforePageDisplay which consults the CheckUserClientHintsUnsetHeaderWhenPossible variable before setting Accept-CH to an empty string. I don't know why this would have worked in a pre-SUL3 rollout set up.

Change #1134631 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/CheckUser@master] ClientHints: Don't override SpecialPageBeforeExecute header handling

https://gerrit.wikimedia.org/r/1134631

I don't know why this would have worked in a pre-SUL3 rollout set up.

It's quite possible that the problem does predate the rollout, and simply went unrecognised/unreported because in most cases, we'd have gotten the variables of interest from subsequent actions, and so might not have had much reason to give much thought to the low-entropy hint that was also provided. Looking through some historical notes, the earliest instances of low-entropy CHs being displayed in overview tables (that I could find) are from late '24/early '25 (hence pre-dating the rollout), but there are some earlier instances where no CH was provided at all (despite use of Chrome). Alas, the question is probably mostly academic -- thank you for tackling this so quickly, @kostajh .

Change #1134631 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] ClientHints: Don't override SpecialPageBeforeExecute header handling

https://gerrit.wikimedia.org/r/1134631

dom_walden subscribed.

Logging into https://test.wikipedia.org on a few different (emulated) Android devices, doing a CheckUser query against the username I see client hints like: Brand: Chromium 133.0.6943.137, Platform: Android 15.0.0. I guess this is what we wanted.