Skip to content

Allow removing Accept-CH response headers #3230

Open
@cyyynthia

Description

@cyyynthia

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

Client Hints are a draft standard allowing servers to request specific client information, through the Accept-CH and sometimes Critical-CH headers. The spec, written by Google, claims they are here to help avoid passive fingerprinting via User-Agents.

However, all websites operated by Google request through Client Hints information that is completely unnecessary to their operations, namely:

  • CPU Architecture
  • Bitness (64bit vs 32bit)
  • Full browser version
  • OS name and version
  • Phone model name (e.g. Pixel 7)
  • Whether you're using a 32bit browser on 64bit Windows (WOW64)

A very easy fix to prevent Google (and possibly others ill-intentioned websites) to gather this data is to drop the Accept-CH and Critical-CH headers from responses. Additional steps can be taken, such as dropping Sec-CH-* headers on outgoing requests, and appending Clear-Site-Data: "clientHints" to responses to tell the browser to immediately cease to send Client Hints.

Currently, uBO doesn't allow doing this, as the response header filtering capability is limited to only 4 headers, excluding the 2 headers mentioned above.

A specific URL where the issue occurs.

Everywhere

Steps to Reproduce

  1. Go to a Google-owned website
  2. Observe the network traffic
  3. See the Accept-CH response headers, and the Sec-CH-* headers on subsequent requests

Expected behavior

The following rule to prevent the Accept-CH to be received and handled

example.com##^responseheader(accept-ch)

Actual behavior

The rule is invalid, the header is not trimmed and client hints are sent to the server.

uBO version

1.57.0

Browser name and version

Chromium 124.0.6367.91 (Official Build)

Operating System and version

Arch Linux 6.8.7-arch1-2

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions