File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1262,6 +1262,12 @@ A `TypeError` is thrown if `urlString` is not a string.
12621262
12631263A ` URIError ` is thrown if the ` auth ` property is present but cannot be decoded.
12641264
1265+ Use of the legacy ` url.parse() ` method is discouraged. Users should
1266+ use the WHATWG ` URL ` API. Because the ` url.parse() ` method uses a
1267+ lenient, non-standard algorithm for parsing URL strings, security
1268+ issues can be introduced. Specifically, issues with [ host name spoofing] [ ] and
1269+ incorrect handling of usernames and passwords have been identified.
1270+
12651271### ` url.resolve(from, to) `
12661272<!-- YAML
12671273added: v0.1.25
@@ -1379,6 +1385,7 @@ console.log(myURL.origin);
13791385[ WHATWG URL Standard ] : https://url.spec.whatwg.org/
13801386[ WHATWG URL ] : #url_the_whatwg_url_api
13811387[ examples of parsed URLs ] : https://url.spec.whatwg.org/#example-url-parsing
1388+ [ host name spoofing ] : https://hackerone.com/reports/678487
13821389[ legacy `urlObject` ] : #url_legacy_urlobject
13831390[ percent-encoded ] : #whatwg-percent-encoding
13841391[ stable sorting algorithm ] : https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
You can’t perform that action at this time.
0 commit comments