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
Refs: #48873
Refs: #48855
Refs: #48850
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
anonrig authored and RafaelGSS committed Aug 15, 2023
1 parent 3680a66 commit 420b85c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,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 420b85c

Please sign in to comment.