Skip to content

fix: ignore malformed uris in tranform middleware #19853

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

Merged
merged 5 commits into from
Apr 24, 2025
Merged

Conversation

itschasa
Copy link
Contributor

@itschasa itschasa commented Apr 12, 2025

Description

Fixes #19848

(might want to squash these commits lol)

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Apr 14, 2025
@sapphi-red sapphi-red changed the title fix: malformed uri causing error fix: ignore malformed uris in tranform middleware Apr 15, 2025
@sapphi-red sapphi-red added the feat: dev dev server label Apr 15, 2025
@sapphi-red sapphi-red requested a review from hi-ogawa April 24, 2025 02:33
Copy link
Collaborator

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what else error can happen in the little snippet, but catching it makes sense to me 👍

(Also linking Vitest issue vitest-dev/vitest#7788 since we just recently discussed we need a similar decodeURI somewhere for Vitest browser mode)

@hi-ogawa hi-ogawa merged commit e4d5201 into vitejs:main Apr 24, 2025
17 checks passed
@itschasa
Copy link
Contributor Author

I wonder what else error can happen in the little snippet, but catching it makes sense to me 👍

Most things happening in that try block are .replace(), so not much else can error from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: dev dev server p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URI malformed when receiving traffic from bittorrent clients
3 participants