-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Privacy Badger does not set the doNotTrack variable in JavaScript's navigator object #1835
Comments
We should be able to get this fixed by doing something like the following inside all pages (and frames?): Object.defineProperty(Object.getPrototypeOf(navigator), "doNotTrack", {
get: () => {
return "1";
}
}); I previously thought |
We should check if using the new |
@ghostwords Thanks for responding!
One option is to let users make the choice. Privacy Badger (PB) can have both options:
That being said, this leaves open the hard question of determining which should be the default (since most users may not change settings). Personally, I am in favor of the former, since it provides users with finer-grained control: if someone is making the effort of disabling PB on a page, they should be able to remove all its effects. I suppose there is something analogous to the doNotTrackEnabled capability for Firefox too. So, this discussion pertains to both browsers. |
If PB implements the DNT consent API (#1230) it will have to use the defineProperty method. The value of navigator.doNotTrack will depend on whether the storeTrackingException has been called, which could be web wide or site specific. Even if the implementation is not designed to immediately reflect the result of the call (the spec leaves that as an option) the correct value of navigator.doNotTrack must be available when any new browsing context is initiated (not just a 1st party i.e. top level context). |
It seems like Privacy Badger sends the Dnt header, but does not set the doNotTrack variable in JavaScript navigator object. This is different from Firefox's Tracking Protection (https://support.mozilla.org/en-US/kb/tracking-protection) and Chrome's Do Not Track (https://support.google.com/chrome/answer/2790761) behavior: they send the Dnt header in addition to setting the Javascript navigator doNotTrack variable.
I was wondering why Privacy Badger does not set the doNotTrack variable. Could this have privacy consequences for Privacy Badger users (e.g., against a web service that only detects Do Not Track using JavaScript)?
Attaching some screenshots displaying the doNotTrack variable using a small piece of code on w3schools.com. The screenshots show that Privacy Badger does not modify that variable, unlike Firefox's Tracking Protection and Chrome's Do Not Track features.
Baseline Firefox:



Firefox with Privacy Badger:
Firefox with Tracking Protection enabled:
Baseline Chrome:



Chrome with Privacy Badger:
Chrome with Do Not Track enabled:
Screenshots were produced on
Chrome version: 63.0.3239.132
Firefox version: 56.0
using
Chrome extension version: 2017.11.20
Firefox add-on version: 2017.11.20
The text was updated successfully, but these errors were encountered: