Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
here-nerd opened this issue Jul 15, 2021 · 3 comments
Closed

Comments

@here-nerd
Copy link

For example, I do

normalizeUrl('asdfas;45')

Expect: 'Invalid URL'

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

@sindresorhus
Copy link
Owner

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

@here-nerd
Copy link
Author

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?

@here-nerd
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants