[Webkit-unassigned] [Bug 207540] New: Allow Content Blocker lists to contain both if/unless-domain and if/unless-top-url trigger fields

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 11 06:34:45 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=207540

            Bug ID: 207540
           Summary: Allow Content Blocker lists to contain both
                    if/unless-domain and if/unless-top-url trigger fields
           Product: WebKit
           Version: Other
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: khickinson at brave.com

The current content blocker API fails to compile a list if you attempt to have a list that contains both the `if-domain` and `if-top-url` (or `unless-domain` and `unless-top-url`) url triggers, even if said triggers are not in the same rule.  For example, this list will fail to compile:


```
[
  {
    "trigger": {
        "url-filter": ".*",
        "resource-type": ["image", "style-sheet"],
        "unless-domain": ["foo.com", "bar.com"]
    },
    "action": {
      "type": "block"
    }
  },
  {
    "trigger": {
        "url-filter": ".*",
        "resource-type": ["script"],
        "unless-top-url": "baz.com",
    },
    "action": {
      "type": "block"
    }
  }
]
```

These two rules are completely unrelated to each other, but WebKit will fail to compile this list because of the usage of both `unless-domain` and `unless-top-url` in the same file

This limitation isn't specified in the documentation around these triggers. The only thing the documentation specifies is that you cannot use `if-domain` and `unless-domain`, or `if-top-url` and `unless-top-url` in the same rule. 

I think the expected result is that these rules should be allowed to co-exist in the same list

rdar://FB7557901

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200211/f796ede0/attachment.htm>


More information about the webkit-unassigned mailing list