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

Fix test runner #5686

Merged
merged 4 commits into from
Nov 28, 2024
Merged

Fix test runner #5686

merged 4 commits into from
Nov 28, 2024

Conversation

nightwing
Copy link
Member

No description provided.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.01%. Comparing base (b3625f3) to head (21ddf07).
Report is 2 commits behind head on master.

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     
Flag Coverage Δ
unittests 87.01% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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) {
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Member Author

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

@nightwing nightwing merged commit 16a75fc into master Nov 28, 2024
3 checks passed
@nightwing nightwing deleted the fix-test-runner branch November 28, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants