Support ws and wss protocols on the webRequest API

RESOLVED FIXED in Firefox 55

Status

enhancement
P2
normal
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: rpl, Assigned: mixedpuppy)

Tracking

unspecified
mozilla55
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [triaged])

Attachments

(1 attachment)

Reporter

Description

2 years ago
WebExtensions addons may want to listen for webRequest related to websocket connections (which use the ws and wss as the protocol names), e.g. uBlock-Origin is one of these extensions:

- https://github.com/gorhill/uBlock/blob/ca32a693df510fb1018ecde2e8a2412f622aab3c/platform/chromium/vapi-background.js#L1099-L1119

Currently, when trying to add a webRequest listener using ws or wss urls in the event filters logs, the following errors are logged in the console:

- Invalid match pattern: 'ws://*/*'
- Invalid match pattern: 'wss://*/*'
- The webRequest.addListener filter doesn't overlap with host permissions
Reporter

Updated

2 years ago
Blocks: 1309926

Updated

2 years ago
Assignee: nobody → mixedpuppy
Priority: -- → P2
Whiteboard: [triaged]
Assignee

Comment 1

2 years ago
Websockets work fine in webrequest, the urls show up under http/s.  We could change the url for addons listening on websockets, but I wonder where else that url could end up being an issue.

In any case this waits on bug 1368102
Depends on: 1368102
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Attachment #8875399 - Flags: review?(lgreco)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8875399 [details]
Bug 1367478 support websocket ws/wss protocol in matchpattern,

https://reviewboard.mozilla.org/r/146840/#review151538
Attachment #8875399 - Flags: review?(kmaglione+bmo) → review+

Comment 4

2 years ago
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/62e44a827308
support websocket ws/wss protocol in matchpattern, r=kmag

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/62e44a827308
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Reporter

Updated

2 years ago
Attachment #8875399 - Flags: review?(lgreco)
Assignee

Updated

2 years ago
Depends on: 1382834

Updated

11 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.