From 69aaf8b1d10ad861a94833b99fe302a8b3cc8242 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Fri, 21 Jul 2023 13:20:25 -0400 Subject: [PATCH] lib: remove invalid parameter to toASCII PR-URL: https://github.com/nodejs/node/pull/48878 Backport-PR-URL: https://github.com/nodejs/node/pull/48873 Refs: https://github.com/nodejs/node/pull/48873 Refs: https://github.com/nodejs/node/issues/48855 Refs: https://github.com/nodejs/node/issues/48850 Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel --- lib/url.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/url.js b/lib/url.js index c7ac8ff5739b9a..2b32a7e8bc8843 100644 --- a/lib/url.js +++ b/lib/url.js @@ -427,10 +427,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. - - // Use lenient mode (`true`) to try to support even non-compliant - // URLs. - this.hostname = toASCII(this.hostname, true); + this.hostname = toASCII(this.hostname); // Prevent two potential routes of hostname spoofing. // 1. If this.hostname is empty, it must have become empty due to toASCII