GitHubJacksonized

fix: prevent environment expansion in muthaf*ckin' remote URLs by Byron · Pull Request #2181 · gitpython-developers/GitPython

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 <[email protected]>

Originally published at github.com. Every curse word you see was added by the Samuel L. Jacksonizer, a parody site. Not affiliated with Samuel L. Jackson or github.com.