Description
- Version: master
- Platform: all
- Subsystem: http
Currently, http.request('http://brave.com%60x.code-fu.org/')
requests http://brave.com/%60x.code-fu.org/
rather than http://brave.com`x.code-fu.org/
. This behavior deviates from the behavior standardized in WHATWG URL Standard and used in browsers, and have caused dangerous security implications for downstream embedders (see talk by @diracdeltas).
This is due to the http.request
function using the legacy url.parse
function rather than the new WHATWG-compliant URL parser. We should switch the URL parser used for string-typed argument to the standard-complaint parser.
This switch will surely have compatibility implications, but I doubt it will cause major breakage since most request-style libraries pass in an object instead of a string as the first argument anyway.
/cc @annevk @BrendanEich (See original tweet.)