Skip to content

Recording canvas fp. script paths does not clean up existing DNR_FP_SCRIPT_* rules #3189

Description

@ghostwords

Existing rules should get removed instead. For example:

  1. Enable local learning
  2. Inspect PB's background process and get existing DNR_FP_SCRIPT_* (BLOCK/SURROGATE_REDIRECT) DNR rules for jsdelivr.net:
(await chrome.declarativeNetRequest.getDynamicRules()).filter(r => r.condition.requestDomains &&
  r.condition.requestDomains[0].endsWith("jsdelivr.net") && [65, 66].includes(r.priority))
  1. Visit https://efforg.github.io/privacybadger-test-fixtures/html/fingerprinting.html
  2. Get the rules again

If you got 15 rules the first time, the second time returns 31 rules (15 + 15 + 1 new path block rule).

When this bug is fixed, the second time should return 16 (15 + 1) rules.

Will probably want to clean up existing DNR_FP_SCRIPT_* rules as part of fpStoreUpdateQueue handling in src/lib/dnr/subscribers.js, similarly to how we clean up existing DNR_SURROGATE_REDIRECT / DNR_USER_SURROGATE_REDIRECT rules as part of rebuilding surrogated resource redirect rules.

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

    MV3Manifest V3-specific issuebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions