Skip to content

Commit 5affce3

Browse files
anonrigUlisesGascon
authored andcommitted
lib: remove invalid parameter to toASCII
PR-URL: nodejs#48878 Refs: nodejs#48873 Refs: nodejs#48855 Refs: nodejs#48850 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 17a1be6 commit 5affce3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/url.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
401401
// It only converts parts of the domain name that
402402
// have non-ASCII characters, i.e. it doesn't matter if
403403
// you call it with a domain that already is ASCII-only.
404-
405-
// Use lenient mode (`true`) to try to support even non-compliant
406-
// URLs.
407-
this.hostname = toASCII(this.hostname, true);
404+
this.hostname = toASCII(this.hostname);
408405

409406
// Prevent two potential routes of hostname spoofing.
410407
// 1. If this.hostname is empty, it must have become empty due to toASCII

0 commit comments

Comments
 (0)