-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Default to WHATWG URL parser in http.request (and friends) #19468
Copy link
Copy link
Closed
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Metadata
Metadata
Assignees
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.requestfunction using the legacyurl.parsefunction 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.)