EFForg / EFForg/SafariWebExtensionBugs
webRequest details object is missing properties to detect the top-level document URL
- Dominant language
- No language data
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The webRequest details object that is passed to webRequest event callbacks is missing `frameAncestors`, and `documentUrl`.
On Firefox, Privacy Badger uses `documentUrl` and `frameAncestors` to [get the top-level document URL](https://github.com/EFForg/privacybadger/blob/16d96d07fc76d8a5173aef4abf7484c347dfbb1c/src/lib/webrequestUtils.js#L67) for a given request. On Chrome, we use `initiator`, but it lacks path information and is not useful for resources belonging to sub frames.
PB can function without `initiator` or `documentUrl`/`frameAncestors`, but we will mis-attribute requests in various corner cases.
Tested on Safari Technology Preview Release 215.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing Safari’s webRequest details object with the Firefox and Chrome behavior described in the issue, using the linked Privacy Badger code as the consumer reference. Identify where Safari exposes webRequest callback details and verify whether frameAncestors and documentUrl can be added consistently; done means both properties are available with correct top-level-document URL information, including subframe requests.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100