Investigate the use case of nsBaseChannel::ClassifyURI
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Tracking
()
People
(Reporter: dimi, Unassigned)
References
Details
As far as I know, the protocols we need to check for SafeBrowsing/Tracking protection are:
- http/https
- ftp
- ws/wss(web socket)
http/https are handled in nsHttpChannel.
ws/wss are based upon http/https so we could probably check there.
So the only use for nsBaseChannel::ClassifyURI[1] is for FTP if I don't miss anything. If this is true, we can use some information in the channel to avoid creating nsChannelClassifier and then call Start()[2]
Comment 1•6 years ago
|
||
(In reply to Dimi Lee [:dimi][:dlee] from comment #0)
ws/wss are based upon http/https so we could probably check there.
What do you mean by this? The channel itself isn't: https://searchfox.org/mozilla-central/rev/2a6f3dde00801374d3b2a704232de54a132af389/netwerk/protocol/websocket/WebSocketChannel.h#64 (but it also isn't based on nsBaseChannel!)
Comment 2•6 years ago
|
||
One thing to note here, with bug 1404744 fixed, if we know somehow that the top-level page is HTTP, we really don't care about FTP at all.
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to :Ehsan Akhgari from comment #1)
(In reply to Dimi Lee [:dimi][:dlee] from comment #0)
ws/wss are based upon http/https so we could probably check there.
What do you mean by this? The channel itself isn't: https://searchfox.org/mozilla-central/rev/2a6f3dde00801374d3b2a704232de54a132af389/netwerk/protocol/websocket/WebSocketChannel.h#64 (but it also isn't based on nsBaseChannel!)
Sorry for my very bad description here.
What I really mean is to establish a WebSocket connection, it sends an HTTP request first for websocket protocol handshake, not really it "bases" on HTTP. As you said, ws/wss is nothing related to nsBaseChannel. I was trying to list all cases here and
figure out what are the possible use cases in nsBaseChannel.
For FTP, I guess we still need it for SafeBrowsing? We can use FTP for top-level load which may still point to a bad URL.
Comment 4•6 years ago
|
||
(In reply to Dimi Lee [:dimi][:dlee] from comment #3)
(In reply to :Ehsan Akhgari from comment #1)
(In reply to Dimi Lee [:dimi][:dlee] from comment #0)
ws/wss are based upon http/https so we could probably check there.
What do you mean by this? The channel itself isn't: https://searchfox.org/mozilla-central/rev/2a6f3dde00801374d3b2a704232de54a132af389/netwerk/protocol/websocket/WebSocketChannel.h#64 (but it also isn't based on nsBaseChannel!)
Sorry for my very bad description here.
What I really mean is to establish a WebSocket connection, it sends an HTTP request first for websocket protocol handshake, not really it "bases" on HTTP. As you said, ws/wss is nothing related to nsBaseChannel. I was trying to list all cases here and
figure out what are the possible use cases in nsBaseChannel.
Yes indeed.
For FTP, I guess we still need it for SafeBrowsing? We can use FTP for top-level load which may still point to a bad URL.
Yeah. As you know, this code is only used for safebrowsing, so I think that is the remaining use case. :-)
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 5•5 years ago
|
||
this is done.
Description
•