You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebSocket: move port restrictions move to Fetch #841
When the WebSockets were being introduced, people at HyBi worried much about it being abused for cross-protocol attacks. IIRC, it's a part of outcome of discussion on such concerns.
I haven't checked but I guess Firefox also has similar port blocking for HTTP. If so, it makes sense to incorporate it into the Fetch spec.
Currently XHR in Chromium results in network error while WebSocket throws as you said. Regardless of the form of error adopted, the banned ports have been not working for Chromium. So, it shouldn't be a pain for us to converge the way of error notification.
Thank you @tyoshino, that was very helpful. I have added port blocking to Fetch. Per the commit listed above. My proposal is that we remove the port blocking from the WebSocket API since it's redundant.
Activity
annevk commentedon Mar 10, 2016
@tyoshino thoughts?
tyoshino commentedon Mar 10, 2016
When the WebSockets were being introduced, people at HyBi worried much about it being abused for cross-protocol attacks. IIRC, it's a part of outcome of discussion on such concerns.
The Blink side implementation of this was done in 2009 for WebKit based on the spec text in WHATWG spec.
https://chromium.googlesource.com/chromium/src/+/37942cd0eaf481d2c52ddc30427683a5c9535752%5E%21/
https://bugs.webkit.org/show_bug.cgi?id=32085
The list was taken from http://www-archive.mozilla.org/projects/netlib/PortBanning.html.
In Chromium, the HTTP stack also blocks access to ports for the same set of known legacy protocols as WebSockets. So, adding this requirement to Fetch would make itself close to our policy.
https://code.google.com/p/chromium/codesearch#chromium/src/net/base/port_util.cc&l=22
This list was already there since the initial commit of Chromium repo (2008-07-26). Maybe it's from the same source (Mozilla's one).
tyoshino commentedon Mar 10, 2016
I haven't checked but I guess Firefox also has similar port blocking for HTTP. If so, it makes sense to incorporate it into the Fetch spec.
Currently XHR in Chromium results in network error while WebSocket throws as you said. Regardless of the form of error adopted, the banned ports have been not working for Chromium. So, it shouldn't be a pain for us to converge the way of error notification.
Define port blocking
[-]WebSocket: should port restrictions move to Fetch?[/-][+]WebSocket: move port restrictions move to Fetch[/+]annevk commentedon Mar 10, 2016
Thank you @tyoshino, that was very helpful. I have added port blocking to Fetch. Per the commit listed above. My proposal is that we remove the port blocking from the WebSocket API since it's redundant.
annevk commentedon Mar 10, 2016
(I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1255386 against Gecko to align with the additions to the port blocklist made by WebKit/Chromium.)
Ms2ger commentedon Mar 10, 2016
servo/servo#9949
WebSocket: leave port blocking to the network layer (Fetch)
Auto merge of #10014 - saurvs:pr1, r=KiChjang
WebSocket: leave port blocking to the network layer (Fetch)
servo: Merge #10014 - Update WebSocket blocked ports to match the Fet…
servo: Merge #10014 - Update WebSocket blocked ports to match the Fet…
servo: Merge #10014 - Update WebSocket blocked ports to match the Fet…