-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
The change introduced in #6503 prevents determining which part of the host string is an IPv6 address and which is the port number.
cc @fxcoudert
Reproduction steps
- Clone a repo using an IPv6 address with a port. For example,
ssh://user@[::1]:2022/somerepo - Have a certificate callback function.
Expected behavior
The certificate callback function can determine what is the host and what is the port.
I'm guessing there is reluctance to make an API breaking change to the callback function to add the port as a separate parameter? That would ultimately be my preference, but I can understand if there are concerns about API changes. However, this resulted in a behavioral change which is roughly equivalent to an API breaking change. Code expecting the value to be a host string no longer works.
Actual behavior
The host string is passed as ::1:2022 preventing a reliable way to determine which part is the IP address and which part is the host.
Version of libgit2 (release number or SHA1)
1.6.1
Operating system(s) tested
Any