-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(sandbox): let UnixLocal ls list a regular file like the other backends #4833
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
Closed
coderdailyone
wants to merge
7
commits into
openai:main
from
coderdailyone:fix/unix-local-ls-regular-file
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
addf8a4
fix(sandbox): let UnixLocal ls list a regular file like the other bac…
52ab1c3
fix(sandbox): report a leaf symlink as itself in UnixLocal ls, and fi…
a136e76
fix(sandbox): keep the requested leaf for user-scoped ls and exact-fi…
be3bb30
fix(sandbox): rebuild the ls leaf from the canonical path and lstat i…
14b8158
fix(sandbox): validate the ls leaf location through the workspace pat…
369d1de
fix(sandbox): keep a symlinked workspace root listable
1a28ac1
fix(sandbox): recognize a noncanonical spelling of the workspace root…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
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.
When
Manifest.rootis a symlink and the caller lists the normal root path"."(or the configured root alias itself),absolute_pathbecomes that alias and this line preserves it while only resolving its parent. The subsequent containment check compares the alias against the resolved workspace target and raisesInvalidManifestPathError, so the workspace root cannot be listed. Fresh evidence beyond the earlier resolved-root report is the root path itself—the added test covers only a child addressed through the resolved root. Treat the configured root alias as authorized when the requested leaf is the root, while preserving leaf symlinks below it.Useful? React with 👍 / 👎.
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.
Fixed. In the leaf-preserving branch the workspace root itself (relative
./empty, or the configured root path, i.e. the alias) is now always addressed through its resolved form, so it stays authorized under a symlinkedManifest.root; only entries below the root keep their leaf identity.test_ls_lists_a_symlinked_workspace_rootcovers.,"",<alias>, and<alias>/; all four fail on the previous revision and pass now.