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.
1262
1262
1263
1263
A ` URIError ` is thrown if the ` auth ` property is present but cannot be decoded.
1264
1264
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
+
1265
1271
### ` url.resolve(from, to) `
1266
1272
<!-- YAML
1267
1273
added: v0.1.25
@@ -1379,6 +1385,7 @@ console.log(myURL.origin);
1379
1385
[ WHATWG URL Standard ] : https://url.spec.whatwg.org/
1380
1386
[ WHATWG URL ] : #url_the_whatwg_url_api
1381
1387
[ examples of parsed URLs ] : https://url.spec.whatwg.org/#example-url-parsing
1388
+ [ host name spoofing ] : https://hackerone.com/reports/678487
1382
1389
[ legacy `urlObject` ] : #url_legacy_urlobject
1383
1390
[ percent-encoded ] : #whatwg-percent-encoding
1384
1391
[ stable sorting algorithm ] : https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
You can’t perform that action at this time.
0 commit comments