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

Unexpected behavior when passing a data: URL into parseURL() #158

Closed
fabiankachlock opened this issue Jul 29, 2023 · 0 comments · Fixed by #159
Closed

Unexpected behavior when passing a data: URL into parseURL() #158

fabiankachlock opened this issue Jul 29, 2023 · 0 comments · Fixed by #159
Labels
bug Something isn't working

Comments

@fabiankachlock
Copy link

Environment

Version: 1.2.0

Reproduction

https://stackblitz.com/edit/js-smsxy5?file=index.js

parseURL('data:image/png;base64,aaa//bbbbbb/ccc')
// { auth: "", hash: "", host: "bbbbbb", pathname: "/ccc", protocol: "", search: "" }

Describe the bug

When a data URL is passed into parseURL() it might detect a host and a pathname based on the base64 content of the data URL.

Additional context

Downstream issue: nitrojs/nitro#1431

Logs

No response

@pi0 pi0 changed the title Unexpected behavior when passing a data URL into parseURL() Unexpected behavior when passing a data: URL into parseURL() Jul 29, 2023
@pi0 pi0 added the bug Something isn't working label Jul 29, 2023
@pi0 pi0 closed this as completed in #159 Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants