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

libgit2: fix for broken SSH host callback #39364

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

StefanKarpinski
Copy link
Member

This PR fixes a couple of issues with #39324 as reported in #38777:

  1. The patch caused libgit2 to crash when cloning with a user@host implicit SSH URL (as opposed to an explicit ssh://user@host URL which worked correctly).
  2. The callback was passing a byte vector when the method expected a string; this changes the method to take a byte vector instead.

@StefanKarpinski StefanKarpinski force-pushed the sk/libgit2-hostkey-patch-fix branch from 9f985c6 to fe61a12 Compare January 22, 2021 17:42
@jmert
Copy link
Contributor

jmert commented Jan 22, 2021

I can confirm this fixes both issues for me. Thanks!

@maleadt
Copy link
Member

maleadt commented Jan 25, 2021

Backport? I ran into the ssh_knownhost_check MethodError on the backports-release-1.6 branch. cc @KristofferC

@KristofferC KristofferC added the backport 1.6 Change should be backported to release-1.6 label Jan 25, 2021
KristofferC pushed a commit that referenced this pull request Jan 26, 2021
@KristofferC KristofferC mentioned this pull request Jan 26, 2021
60 tasks
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Feb 1, 2021
KristofferC pushed a commit that referenced this pull request Feb 1, 2021
vtjnash pushed a commit that referenced this pull request Feb 12, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
@fxcoudert
Copy link
Contributor

This patch introduces a bug:

if (atoi(urldata.port) == SSH_DEFAULT_PORT) {

That condition can never be true because in libgit2 we have:

#define SSH_DEFAULT_PORT "22"

so SSH_DEFAULT_PORT is a pointer, not an integer value.

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.

5 participants