Skip to content

Commit e4d5201

Browse files
authored
fix: ignore malformed uris in tranform middleware (#19853)
1 parent 55cfd04 commit e4d5201

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/vite/src/node/server/middlewares/transform.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ export function transformMiddleware(
127127
'\0',
128128
)
129129
} catch (e) {
130+
if (e instanceof URIError) {
131+
server.config.logger.warn(
132+
colors.yellow('Malformed URI sequence in request URL'),
133+
)
134+
return next()
135+
}
130136
return next(e)
131137
}
132138

0 commit comments

Comments
 (0)