Open
Description
It looks like Validate
function requires a path to be passed as a second argument:
func Validate(user *url.Userinfo, path string, port int, identity string) (*config.Destination, *url.URL, error) {
// url.Parse NEEDS ssh://, if this ever fails or returns some nonsense, that is why.
uri, err := url.Parse(path)
if err != nil {
return nil, nil, err
}
https://github.com/containers/common/blob/main/pkg/ssh/utils.go#L21
BUT in golangConnectionDial
https://github.com/containers/common/blob/main/pkg/ssh/connection_golang.go#L92
The invocation passes options.Host (which at this point is simply an IP "x.x.x.x")
func golangConnectionDial(options ConnectionDialOptions) (*ConnectionDialReport, error) {
_, uri, err := Validate(options.User, options.Host, options.Port, options.Identity)
if err != nil {
return nil, err
}
This caused the uri.Host
and uri.Path
values to be invalid

Metadata
Metadata
Assignees
Labels
No labels