fix: resolving relative paths in symlinks#224
Merged
mhdawson merged 4 commits intonodejs:mainfrom Dec 7, 2023
Merged
Conversation
feff9b7 to
89b6941
Compare
Collaborator
|
Thanks for the PR. It looks like there is a compilation error: https://github.com/nodejs/uvwasi/actions/runs/5854703133/job/15876962601 |
Contributor
Author
|
Sorry, I forgot to remove the unused variable 🤦🏼 and fixed another memory problem in tests. |
guybedford
approved these changes
Aug 21, 2023
Contributor
guybedford
left a comment
There was a problem hiding this comment.
I think this would be safe to merge provided we can include documentation to the project along the lines of it not providing a security sandbox so that we don't need to consider this PR from a security perspective.
yagehu
pushed a commit
to yagehu/uvwasi
that referenced
this pull request
Dec 8, 2023
* fix: resolving relative paths in symlinks * remove unused variable * fix memory leak in tests * fix mistaken assertions for windows in tests
mhdawson
added a commit
to mhdawson/io.js
that referenced
this pull request
Jan 3, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com>
mhdawson
added a commit
to nodejs/node
that referenced
this pull request
Jan 8, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
marco-ippolito
pushed a commit
to marco-ippolito/node
that referenced
this pull request
Jan 12, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: nodejs#51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Medhansh404
pushed a commit
to Medhansh404/node
that referenced
this pull request
Jan 19, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: nodejs#51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos
pushed a commit
to nodejs/node
that referenced
this pull request
Feb 15, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
richardlau
pushed a commit
to nodejs/node
that referenced
this pull request
Mar 25, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
richardlau
pushed a commit
to nodejs/node
that referenced
this pull request
Mar 25, 2024
- update uvwasi to 0.0.20 - adjust tests to reflect udpated behaviour from nodejs/uvwasi#224 included in uvwasi 0.0.20 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #51355 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes nodejs/node#49107 (relative paths in symlinks resolved incorrectly).
When following a symbolic link that points to a target using a relative path, the
uvwasi__resolve_path()function resolves and normalizes the link's target as a relative path starting fromfd->real_path. This should be treated as a relative path starting from the parent directory of the symbolic link.For example, given the directory structure below:
When
fd->real_pathis., the link target for link is resolved as../source_file, not./source_file. As a result, this resolution ends with anENOTCAPABLEerror.