File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1244,6 +1244,12 @@ A `TypeError` is thrown if `urlString` is not a string.
1244
1244
1245
1245
A ` URIError ` is thrown if the ` auth ` property is present but cannot be decoded.
1246
1246
1247
+ Use of the legacy ` url.parse() ` method is discouraged. Users should
1248
+ use the WHATWG ` URL ` API. Because the ` url.parse() ` method uses a
1249
+ lenient, non-standard algorithm for parsing URL strings, security
1250
+ issues can be introduced. Specifically, issues with [ host name spoofing] [ ] and
1251
+ incorrect handling of usernames and passwords have been identified.
1252
+
1247
1253
### ` url.resolve(from, to) `
1248
1254
<!-- YAML
1249
1255
added: v0.1.25
@@ -1361,6 +1367,7 @@ console.log(myURL.origin);
1361
1367
[ WHATWG URL Standard ] : https://url.spec.whatwg.org/
1362
1368
[ WHATWG URL ] : #url_the_whatwg_url_api
1363
1369
[ examples of parsed URLs ] : https://url.spec.whatwg.org/#example-url-parsing
1370
+ [ host name spoofing ] : https://hackerone.com/reports/678487
1364
1371
[ legacy `urlObject` ] : #url_legacy_urlobject
1365
1372
[ percent-encoded ] : #whatwg-percent-encoding
1366
1373
[ stable sorting algorithm ] : https://en.wikipedia.org/wiki/Sorting_algorithm#Stability
You can’t perform that action at this time.
0 commit comments