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

Strict fingerprint blocking prevents sites from detecting color scheme preference #17550

Closed
kdkasad opened this issue Aug 19, 2021 · 2 comments
Closed

Comments

@kdkasad
Copy link

kdkasad commented Aug 19, 2021

Description

When fingerprint blocking is set to "Strict", Brave no longer matches (prefers-color-scheme: dark) in sites even if the preferred color scheme is set to Dark in brave://settings.

This means that sites which would normally display a dark color scheme based on your browser's settings only show the light theme. The only solution is setting fingerprint blocking to "Standard."

Steps to Reproduce

  1. Set "Brave colors" to "Dark" in brave://settings.
  2. Set fingerprint blocking to "Strict".
  3. Go to any site.
  4. In the JS console, type the following:
window.matchMedia('(prefers-color-scheme: dark)').matches
  1. The output will show false even though it should be true.

Actual result:

The media query (prefers-color-scheme: dark) evaluates to false.

Expected result:

The media query (prefers-color-scheme: dark) should evaluate to true.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave: 1.28.105 Chromium: 92.0.4515.131 (Official Build) (64-bit)
Revision: 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS: Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release?
    yes
  • Can you reproduce this issue with the beta channel?
    yes
  • Can you reproduce this issue with the nightly channel?
    yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
    yes
  • Does the issue resolve itself when disabling Brave Rewards?
    no
  • Is the issue reproducible on the latest version of Chrome?
    no

Miscellaneous Information:

It's possible that this is intended, but if so, I believe there should be an extra option to allow sites to access your color scheme preferences rather than having to disable strict fingerprint blocking for all sites which use this color scheme detection method.

@Tonev
Copy link
Contributor

Tonev commented Aug 19, 2021

It's intentional behavior related to #15265.

@ShivanKaul added a flag that allows users to opt out of the dark theme blocking while using strict fingerprinting protection. The flag is currently available in Brave Nightly, so until it's uplifted into the stable channel you have to either use Standard fingerprinting protection on a per-site basis or global level, alternatively you can use Brave Nightly.

brave/brave-core#9735

@rebron
Copy link
Collaborator

rebron commented Aug 20, 2021

@ShivanKaul Ok to close this one out? Looks like it's working as intended.

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

No branches or pull requests

4 participants