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

sanitize ssh options parsed from ssh:// url #2241

Merged
merged 1 commit into from May 19, 2017
Merged

Conversation

technoweenie
Copy link
Contributor

This fixes an issue where SSH options can be parsed out of ssh:// urls. For example, the url ssh://-oProxyCommand=gnome-calculator will exec the following command:

$ ssh -p 12345 -oProxyCommand=gnome-calculator git-lfs-authenticate ...

SSH will run the command from the -oProxyCommand flag, which is not what we want.

This PR fixes it by inserting --, which disables SSH options after it.

$ ssh -p 12345 -- -oProxyCommand=gnome-calculator git-lfs-authenticate ...

LFS does support plink and tortoiseplink, which don't have anything like --. So instead, LFS will remove any leading -'s from the user@host components of the ssh:// url.

@technoweenie technoweenie added this to the v2.1.1 milestone May 19, 2017
@ttaylorr ttaylorr merged commit f913f5f into master May 19, 2017
ttaylorr added a commit that referenced this pull request May 19, 2017
ttaylorr added a commit that referenced this pull request May 19, 2017
Backport #2241 for v2.1.x: sanitize ssh options parsed from ssh:// url
@larsxschneider
Copy link
Member

I assume v1.5.6 is affected, too?
Is v1.5.6 considered end of life and therefore it will not receive any security patches?
I assume yes, I just want to clarify.

@ttaylorr
Copy link
Contributor

I assume v1.5.6 is affected, too?

You are correct in your assumption, 1.5.6 is affected.

Is v1.5.6 considered end of life and therefore it will not receive any security patches?

All v1.x.x releases are outside of the MAJOR semver indicator, so are considered EOL'd. I'm happy to cut a 2.0.x release containing this patch, if you'd like.

@ttaylorr ttaylorr deleted the ssh-options-fix branch May 22, 2017 15:46
@larsxschneider
Copy link
Member

Thanks for the clarification! No v2.0.x patch necessary! 😄

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

3 participants