-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
lib: handle windows reserved device names on UNC #59286
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
lib: handle windows reserved device names on UNC #59286
Conversation
We have found that UNC paths weren't covered when .join/.normalize windows reserved device names (COM1, LPT1).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #59286 +/- ##
==========================================
- Coverage 89.98% 89.91% -0.07%
==========================================
Files 649 655 +6
Lines 192180 192865 +685
Branches 37655 37806 +151
==========================================
+ Hits 172934 173419 +485
- Misses 11866 12005 +139
- Partials 7380 7441 +61
🚀 New features to boost your workflow:
|
|
cc: @nodejs/path @nodejs/platform-windows |
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.
lgtm
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Frequent error on |
|
Landed in a73b575 |
We have found that UNC paths weren't covered when .join/.normalize windows reserved device names (COM1, LPT1). PR-URL: #59286 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
We have found that UNC paths weren't covered when .join/.normalize windows reserved device names (COM1, LPT1). PR-URL: #59286 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

lib: handle windows reserved device names on UNC
Windows paths (specifically, UNC) are confusing, I'm not convinced I have covered all cases where
..would skip device names, but this PR should improve things a bit.Without this PR a path
\\\\?\\COM1:.\\..\\..\\foo2.jswould be "normalized" to\\\\?\\foo2.js(skipping the COM1 device completely). This is not a vulnerability because we clearly state that path sanitisation is the user's responsibility in #59262