Skip to content

Commit

Permalink
test: validate host with commas on url.parse
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 e426180 commit 2de9868
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/parallel/test-url-parse-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,22 @@ const parseTests = {
path: '/',
href: 'https://evil.com$.example.com/'
},

// Validate the output of hostname with commas.
'x://0.0,1.1/': {
protocol: 'x:',
slashes: true,
auth: null,
host: '0.0,1.1',
port: null,
hostname: '0.0,1.1',
hash: null,
search: null,
query: null,
pathname: '/',
path: '/',
href: 'x://0.0,1.1/'
}
};

for (const u in parseTests) {
Expand Down

0 comments on commit 2de9868

Please sign in to comment.