-
Notifications
You must be signed in to change notification settings - Fork 202
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
path: dest paths inside container should always be treated as *nix type #731
path: dest paths inside container should always be treated as *nix type #731
Conversation
Destination path inside containers should be always validated as *nix absolute path. So its recommended to use path.IsAbs() instead of filepath.IsAbs(). [NO TEST NEEDED] Signed-off-by: flouthoc <[email protected]>
@rhatdan PTAL |
Not needed anymore after containers/podman#11231 but still good to use |
/approve |
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
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, giuseppe, rhatdan, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Closes: containers/podman#10900
Destination path inside containers should be always validated as
*nixtype absolute path.
So its recommended to use
path.IsAbs()
instead offiltepath.IsAbs()
for destination checks. Sincefilepath.IsAbs()
will use path_windows on windows host but destination path inside the containers should always be of *nix type.Reference:
https://cs.opensource.google/go/go/+/refs/tags/go1.16.7:src/path/path.go;l=219
https://cs.opensource.google/go/go/+/refs/tags/go1.16.7:src/path/filepath/path_windows.go
https://cs.opensource.google/go/go/+/refs/tags/go1.16.7:src/path/filepath/path_unix.go