Open Hainish opened 8 years ago
If I recall this might have been necessary due to the timing of how privacy badger detects local storage tracking. @gunesacar may be able to offer more insight. Is it possible to modify the tests to account for this?
@cooperq it's possible. I'll wait for @gunesacar's reply before I start on this.
Good catch! Apparently we undercount the supercookie prevalence by one.
The reason for this is we don't call recordPrevalence
for the first occurrence of supercookie trackers. We record the prevalence in heuristicBlockingAccounting and we don't yet know whether this is a supercookie tracker or not while making the first HTTP request.
I added a call to recordPrevalence
when we first encounter a supercookie tracker.
https://github.com/EFForg/privacybadgerchrome/compare/master...gunesacar:issue726?expand=1
The test passes with this change.
This issue applies to both Firefox and Chrome versions, if you like the Chrome fix I can send PR for Firefox too.
Tested on https://pbtest.org/ using a fresh Firefox profile with PB newly installed, I get the following result for loading of localstorage objects:
This causes the following test to fail initially:
After a page reload, the test passes.