Skip to content
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

subprocess: don't treat empty PATH component as . on Windows #4603

Merged
merged 1 commit into from Aug 31, 2021

Conversation

bk2204
Copy link
Member

@bk2204 bk2204 commented Aug 31, 2021

It's common for Windows machines to have trailing empty PATH components and users there don't expect that to mean "." like it does on Unix. To avoid unexpected behavior and somewhat improve security, treat the empty PATH component differently on Windows.

@bk2204 bk2204 added this to the v3.0.0 milestone Aug 31, 2021
@bk2204 bk2204 requested a review from a team August 31, 2021 14:32
Copy link
Contributor

@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

subprocess/path.go Outdated Show resolved Hide resolved
It's common for Windows machines to have trailing empty PATH components
and users there don't expect that to mean "." like it does on Unix.  To
avoid unexpected behavior and somewhat improve security, treat the empty
PATH component differently on Windows.
@bk2204 bk2204 merged commit 4b3dc46 into git-lfs:main Aug 31, 2021
@bk2204 bk2204 deleted the windows-no-empty-path branch August 31, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants