-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 test runner #5686
Fix test runner #5686
Conversation
16682e1
to
11b3abf
Compare
11b3abf
to
21ddf07
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5686 +/- ##
==========================================
- Coverage 87.01% 87.01% -0.01%
==========================================
Files 598 598
Lines 43683 43566 -117
Branches 7204 7157 -47
==========================================
- Hits 38012 37910 -102
+ Misses 5671 5656 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
var posixUri = uri.replaceAll(path.sep, path.posix.sep); | ||
var normalizedPosixUri = path.normalize(uri).replaceAll(path.sep, path.posix.sep); | ||
if (normalizedPosixUri !== posixUri) { | ||
if (filename.slice(0, root.length) !== root) { |
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.
Won't a path like "path/to/ace/folder/../../../../CONFIDENTIAL_FILE" pass this check?
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.
What if we normalize it and then check if it doesn't start with root?
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.
Path join already calls normalize, The path.join() method joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
https://nodejs.org/api/path.html#pathjoinpaths
No description provided.