Repository navigation
Conversation
PKGMAN_Exec joined its arguments with spaces and handed the result to 'sh -c', so an argument containing a space was split, and one containing '$(...)' or ';' was executed. Such arguments include URLs and archive names taken from PackageInfo.g files fetched from the network. Pass command and arguments to the shell as positional parameters instead; it still adds the '2>&1', but never parses them. Two callers passed an empty string meaning "no option", which is now an argument of its own, so they pass nothing instead. Assisted-by: Generative AI
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #158 +/- ##
==========================================
+ Coverage 85.12% 85.14% +0.01%
==========================================
Files 22 22
Lines 1022 1023 +1
==========================================
+ Hits 870 871 +1
Misses 152 152
🚀 New features to boost your workflow:
|
Collaborator
|
I'm having a bit of trouble with this. What is the problem that this PR is attempting to solve, and what is the intention of |
This branch has not been deployed
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.
Claude writing here:
PKGMAN_Execjoins its arguments with spaces and runs the result withsh -c, so an argument with a space is split and one with$(...)or;is executed. Archive names are the last component of aPackageInfo.g'sArchiveURL, so a crafted URL runs code attar xf.The shell now gets command and arguments as positional parameters (
sh -c 'exec "$0" "$@" 2>&1' cmd arg...): it still merges stderr, but never parses them. #104 is unaffected.Two callers passed
""to mean "no option" (non-GNUtar,hg status); they now pass nothing.