Skip to content

Commit

Permalink
lib: remove invalid parameter to toASCII
Browse files Browse the repository at this point in the history
PR-URL: #48878
Backport-PR-URL: #48873
Refs: #48873
Refs: #48855
Refs: #48850
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
anonrig authored and ruyadorno committed Aug 16, 2023
1 parent 2de9868 commit 69aaf8b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/url.js
Expand Up @@ -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
Expand Down

0 comments on commit 69aaf8b

Please sign in to comment.