Bug 257858
| Summary: | getMatchedRules() from declarativeNetRequest not displaying the MatchedRule with the ruleId and rulesetId | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | B Gill <b.gill.messages> |
| Component: | WebKit Extensions | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED MOVED | ||
| Severity: | Normal | CC: | achristensen, bfulgham, karlcow, timothy, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 12 | ||
B Gill
When using getMatchedRules() from declarativeNetRequest
(https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#method-getMatchedRules), the item that is returned contains a "url" field instead of the MatchedRules object which should contain a ruleId and rulesetId:
https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#type-MatchedRule
This is an example of what is returned:
rulesMatchedInfo: [
{
request: {url: "https://example.com"}
tabId: 2
timeStamp: 1686247475669.134
}
]
As shown above, it only has the "url", not the rule.
The changelog states that for Safari 16.4 getMatchedRules() "fixed result of getMatchedRules() to match other browsers" (https://webkit.org/blog/13966/webkit-features-in-safari-16-4/), however this still doesn't seem to return the same thing that other browsers do.
getMatchedRules() does not give the rule that was matched. It doesn't have the rule ID that was used (e.g. 1, 5, etc), and it does not have the ruleset ID (i.e. the id of the static rules file if it was from the static rules, or if it was a session rule: "_session", or if it was from the dynamic rules: "_dynamic").
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
Not sure this is a WebKit bug, should probably be moved to Safari.
Radar WebKit Bug Importer
<rdar://problem/110832269>
Brent Fulgham
The fix for this bug needs to be made in another component. Switching to RESOLVED | MOVED, with work tracked by <rdar://problem/110832269>
Brent Fulgham
Sorry -- I meant work is tracked by: rdar://97014835.