sindresorhus/normalize-url

Semicolon in the hostname is misinterpreted as a valid hostname on Firefox

Closed this issue · 3 comments

For example, I do

normalizeUrl('asdfas;45')

Expect: 'Invalid URL'

Actual:
on Chrome --> 'Invalid URL'
on Firefox 89.0.2 --> 'http://asdfas;45'

You're gonna have to open an issue on Firefox instead. We're just using new URL.

Thank you @sindresorhus for a quick reply.
I did a quick test on Firefox using new URL as you mentioned. It seems Firefox handles it correctly:
image
Could you please reopen the issue because it doesn't seem to be a Firefox issue?

I wanted to help so I dug a little deeper. Apparently, it a semicolon in URL's hostname is a feature, not a bug. @sindresorhus, you are right that it's not a normailize-url issue. A semicolon is for Web Bundles' new scheme which is already supported by Safari and Firefox. Chrome is lacking behind, see

https://chromium-review.googlesource.com/c/chromium/src/+/2226248/

We can close the issue.