Closed Bug 1166496 Opened 9 years ago Closed 8 years ago

Make some additions to the webRequest API that would be useful for Adblock

Categories

(WebExtensions :: Request Handling, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evilpie, Unassigned)

References

Details

(Whiteboard: triaged)

For ABP we really want to have two additional bits of information.

1) For onBeforeRequest we want the whole chain of URLs from the current frame (or image etc.) to the top frame/window. Usually this is going to be two items. Like ['google.com', 'image.google.com/gif']

2) onHeadersReceived needs the windowId of the channel. Otherwise it's basically impossible to tell for what frame/window the headers apply.
So in onHeadersReceiver we can easily get the innerWindowID from the loadInfo of the channel. However for onBeforeRequest we get the outerWindowID. I am not quite sure which of these is usually more useful, but we really need to use the same one. I think only the innerWindowID is actually unique across different content processes.
I have a patch to attach the outer window ID to the loadinfo. That's the one we want.

We don't have a way to do 1) though.
General question, not adblock-related: Is it possible to get information about sandboxing on web requests?

I think it would be a good policy for content blockers to treat sandboxed content differently since it leaks less browsing information and is less intrusive if the right flags are set.
Component: General → WebExtensions
Product: Firefox → Toolkit
Bill, is this still a thing and do you have that patch from last year?
Flags: needinfo?(wmccloskey)
Whiteboard: triaged
I think #2 was fixed by bug 1163861. #1 is still an issue as far as I know. I'm guessing Giorgio has some thoughts on that.
Flags: needinfo?(wmccloskey)
Any thoughts on part 1 of comment 0 Giorgio?
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Flags: needinfo?(g.maone)
Priority: -- → P3
Depends on: 1305237
(In reply to Tom Schuster [:evilpie] from comment #0)
> For ABP we really want to have two additional bits of information.
> 
> 1) For onBeforeRequest we want the whole chain of URLs from the current
> frame (or image etc.) to the top frame/window. Usually this is going to be
> two items. Like ['google.com', 'image.google.com/gif']
> 

NoScript could use them too. I filed bug 1305237 to add this feature.
Flags: needinfo?(g.maone)
Blocks: webext-port-adblock-plus
No longer blocks: 1280062
Just cleaning, the only blocking bug remaining on this tracker, bug 1305237 already blocks noscript and abp, so this bug serves no purpose. Closing.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.