[Webkit-unassigned] [Bug 245236] New: Content Blocking Rules `if-domain` mismatch when using URLScheme handler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 15 12:09:28 PDT 2022


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

            Bug ID: 245236
           Summary: Content Blocking Rules `if-domain` mismatch when using
                    URLScheme handler
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bwaresiak at pm.me

Created attachment 462361

  --> https://bugs.webkit.org/attachment.cgi?id=462361&action=review

Test cases demonstrating the issue

Overview

We are using URLScheme handler to test Content Blocking rule generation locally, without need for network connection. Since macOS 12 (and corresponding iOS release) we are running into an issue that some tests are consistently failing - Common point is ignore-previous-rules action with trigger that uses if-domain matching.

Steps to Reproduce

See attached file for a test case with an example: there are 4 combinations that should result in the same outcome: test page loading 3rd party resource through preconfigured scheme handler, but in one of the cases test fails (content blocker blocks the request).

Details of configuration:

Content blocking rules (made to block all traffic from otherhost.com but allow one certain resource on a certain website):
        [ {
            "action": { "type": "block" },
            "trigger": { "url-filter": "testscheme://otherhost.com/.*" }
        },
        {
            "action": { "type": "ignore-previous-rules" },
            "trigger": { "url-filter": "testscheme://otherhost.com/img.png", "if-domain": [ "testhost.com" ] }
        } ]

Static website embedding `<img src='testscheme://otherhost.com/img.png'>` resource.

If main page is set to testscheme://testhost.com test blocks img request (unexpected).
If main page is set to testscheme://testhost.com/index.html test allows img request (correct).

If we remove `"if-domain"` from trigger, both above cases allow img request (expected).

Build Date & Hardware

Happens on macOS 12 and recent iOS releases. Tested on revision 833c22ec9c71.

-- 
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/20220915/91a05e38/attachment.htm>


More information about the webkit-unassigned mailing list