-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix(vite): avoid serving arbitrary file in vite-node middleware #20345
Conversation
|
return false | ||
} | ||
|
||
function isParentDirectory (dir: string, file: string): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be happy to see such utils going to pathe/utils
would be much easier to share and also test...
/** | ||
* The following code is ported from vite | ||
* Awaits https://github.com/vitejs/vite/pull/12894 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi0 I'd suggest we do nothing about the code below and wait for the Vite PR to be shipped (so we could remove them). Unless you are saying it could be a nice addition to pathe but not related to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific for this PR of course. And only if finally vite can leverage from same util. Otherwise closest impl is best.
π Linked issue
Code ported from Vite, await vitejs/vite#12894 to refactor.
β Type of change
π Description
π Checklist