{{ message }}
Commit 8634174
fix: prevent environment expansion in remote URLs
Remote and submodule creation expanded environment-variable references in
caller-supplied URLs before storing them in Git configuration. This could
expose process environment values through a later network request or a tracked
.gitmodules file.
Preserve variables literally in the remaining untrusted URL callers while
retaining Git.polish_url() expansion for intentional local-path normalization.
Add regression tests covering remote configuration and submodule configuration.
Git baseline: git remote add and git submodule add accept URL arguments
literally; Git does not perform shell-style environment expansion on those
arguments.
Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>1 parent e59d9ba commit 8634174
4 files changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
685 | 686 | | |
686 | 687 | | |
687 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
688 | 697 | | |
689 | 698 | | |
690 | 699 | | |
| |||

0 commit comments