Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sec-ch-ua client hint should use the same product name regardless of the channel. #25459

Closed
mkarolin opened this issue Sep 16, 2022 · 5 comments · Fixed by brave/brave-core#15134

Comments

@mkarolin
Copy link
Contributor

This is a follow up to #24009 (brave/brave-core#14155).

The code to generate the hint calls version_info::GetProductName() which on MacOS returns different values based on the channel (Beta, Nightly).

@pes10k suggested to the value should be invariable for all channels.

Test plan:

See brave/brave-variations#332

@mkarolin mkarolin self-assigned this Sep 16, 2022
mkarolin added a commit to brave/brave-core that referenced this issue Sep 20, 2022
Brand product name is used in the UA client hint string, but on MacOS
our brand name varies based on the channel. This change assigns a fixed
product name for when constructing the UA client hint string.

Fixes brave/brave-browser#25459
@brave-builds brave-builds added this to the 1.46.x - Nightly milestone Sep 21, 2022
@kjozwiak kjozwiak added the OS/Android Fixes related to Android browser functionality label Oct 4, 2022
@kjozwiak
Copy link
Member

kjozwiak commented Oct 4, 2022

The above requires 1.45.87 or higher for 1.45.x verification 👍 @brave/qa-team note that this is behind Griffin and at the time of verification, might only be enabled on the Nightly channel. Please use brave://flags to enable brave://flags/#allow-certain-client-hints.

@stephendonner
Copy link

stephendonner commented Oct 5, 2022

Verified PASSED using

Brave 1.45.87 Chromium: 106.0.5249.91 (Official Build) beta (x86_64)
Revision fa96d5f07b1177d1bf5009f647a5b8c629762157-refs/branch-heads/5249@{#707}
OS macOS Version 11.7 (Build 20G817)

Steps:

  1. installed 1.45.87
  2. launched Brave
  3. opened brave://flags
  4. set Allow certain request client hints to Enabled
  5. clicked on the Relaunch button
  6. loaded brave.com with the Developer Tools open to the Network panel
  7. clicked on brave.com
  8. examined the Request headers and confirmed the following was present:
sec-ch-ua: "Chromium";v="106", "Brave";v="106", "Not;A=Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
brave://flags brave.com headers
Screen Shot 2022-10-05 at 12 30 27 PM Screen Shot 2022-10-05 at 12 44 43 PM

@MadhaviSeelam
Copy link

MadhaviSeelam commented Oct 5, 2022

Verification PASSED using

Brave | 1.45.87 Chromium: 106.0.5249.91 (Official Build) beta (64-bit)
-- | --
Revision | fa96d5f07b1177d1bf5009f647a5b8c629762157-refs/branch-heads/5249@{#707}
OS | Windows 11 Version 21H2 (Build 22000.978)

Steps:

  1. installed 1.45.87
  2. launched Brave
  3. opened brave://flags
  4. set Allow certain request client hints to Enabled
  5. clicked on the Relaunch button
  6. loaded brave.com with the Developer Tools open to the Network panel
  7. clicked on brave.com
  8. examined the Request headers and confirmed the following was present:
sec-ch-ua: "Chromium";v="106", "Brave";v="106", "Not;A=Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
step 3-5 step 8
image image

@btlechowski
Copy link

Verification passed on

Brave 1.45.90 Chromium: 106.0.5249.103 (Official Build) beta (64-bit)
Revision 182570408a1f25ab2731ef5f283b918df9b9f956-refs/branch-heads/5249_91@{#6}
OS Ubuntu 18.04 LTS

Steps:

  1. installed 1.45.x
  2. launched Brave
  3. opened brave://flags
  4. set Allow certain request client hints to Enabled
  5. clicked on the Relaunch button
  6. loaded brave.com with the Developer Tools open to the Network panel
  7. clicked on brave.com
  8. examined the Request headers and confirmed the following was present:
sec-ch-ua: "Chromium";v="106", "Brave";v="106", "Not;A=Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
brave://flags brave.com headers
image image

@Uni-verse
Copy link
Contributor

Uni-verse commented Oct 19, 2022

Verified on Samsung Galaxy S21 & Samsung Galaxy Tab S7 using the following build(s):

Brave	1.45.106 Chromium: 107.0.5304.36 (Official Build) (64-bit) 
Revision	2f9c7a5a1fe357d87e9bc07c65cca9136b3651c5-refs/branch-heads/5304@{#671}
OS	Android 12; Build/SP1A.210812.016

Steps:

  1. installed 1.45.x
  2. launched Brave
  3. opened brave://flags
  4. set Allow certain request client hints to Enabled
  5. clicked on the Relaunch button
  6. loaded brave.com with the Developer Tools open to the Network panel
  7. clicked on brave.com
  • Verified Android is displayed for platform regardless of the channel
sec-ch-ua: "Brave";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
sec-ch-ua-mobile: ?1
sec-ch-ua-platform: "Android"
Example Example
Screen Shot 2022-10-19 at 2 29 48 PM Screen Shot 2022-10-19 at 5 11 44 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment