Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork937
Fix two remaining Windows untrusted search path cases#1792
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
16 commits Select commitHold shift + click to select a range
1c65efb
Show "not from cwd" test is broken for shell=True
EliahKagan2b47933
Correct the "not from cwd" test and add more cases
EliahKaganc1f6c17
Use SystemRoot instead of WINDIR, to fix tox
EliahKagan06bd2c7
Omit CWD in executable search even when shell=True
EliahKagan7da9c3b
Refactor "not from cwd" test for readability
EliahKagan865c6e8
Further expand "not from cwd" test re: cmd.exe
EliahKagand2506c7
Make Git.execute a bit simpler and very slightly more robust
EliahKagan61b4dda
Start on test_hook_uses_shell_not_from_cwd
EliahKagan66ff4c1
Omit CWD in search for bash.exe to run hooks on Windows
EliahKagan7751436
Extract venv management from test_installation
EliahKagana42ea0a
Cover absent/no-distro bash.exe in hooks "not from cwd" test
EliahKaganf44524a
Avoid spurious "location may have moved" on Windows
EliahKagan15ebb25
Clarify comment in test_hook_uses_shell_not_from_cwd
EliahKaganc551e91
Extract shared logic for using Popen safely on Windows
EliahKagan3eb7c2a
Move safer_popen from git.util to git.cmd
EliahKagan1f3caa3
Further clarify comment in test_hook_uses_shell_not_from_cwd
EliahKaganFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion.pre-commit-config.yaml
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
102 changes: 76 additions & 26 deletionsgit/cmd.py
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
5 changes: 2 additions & 3 deletionsgit/index/fun.py
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
11 changes: 11 additions & 0 deletionsgit/util.py
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
8 changes: 8 additions & 0 deletionstest/fixtures/polyglot
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env sh | ||
# Valid script in both Bash and Python, but with different behavior. | ||
""":" | ||
echo 'Ran intended hook.' >output.txt | ||
exit | ||
" """ | ||
from pathlib import Path | ||
Path('payload.txt').write_text('Ran impostor hook!', encoding='utf-8') |
49 changes: 47 additions & 2 deletionstest/lib/helper.py
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.
Uh oh!
There was an error while loading.Please reload this page.
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.