Add migration to forget __cfduid-linked domains #2536
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1538, fixes #2530.
Follows up on 775ff3e.
This migration gets all "__cfduid" cookies and collects their site (first-party) domains. It then goes through each tracking domain in
snitch_map
and throws away any site domain entries that are found in the "__cfduid" site domains list. It then rebuilds action and snitch maps.Since we only seem to have site domains for the "__cfduid" cookies, we can't differentiate between Cloudflare and non-Cloudflare tracking domains, so this may end up removing non-Cloudflare tracking domains (that were seen on the same site domains as Cloudflare tracking domains). This should be OK as there shouldn't be too many, and Privacy Badgers will automatically relearn to block them.