Default to WHATWG URL parser in http.request (and friends) #19468
Labels
http
Issues or PRs related to the http subsystem.
url
Issues and PRs related to the legacy built-in url module.
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
Currently,
http.request('http://brave.com%60x.code-fu.org/')
requestshttp://brave.com/%60x.code-fu.org/
rather thanhttp://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 legacyurl.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.)
The text was updated successfully, but these errors were encountered: