Revision 24036686c4af84c9e84e486ef3debab6e6d8e6b5 authored by Jeff King on 19 April 2020, 03:48:05 UTC, committed by Jonathan Nieder on 19 April 2020, 23:10:57 UTC
We may feed a URL like "cert:///path/to/cert.pem" into the credential machinery to get the key for a client-side certificate. That credential has no hostname field, which is about to be disallowed (to avoid confusion with protocols where a helper _would_ expect a hostname). This means as of the next patch, credential helpers won't work for unlocking certs. Let's fix that by doing two things: - when we parse a url with an empty host, set the host field to the empty string (asking only to match stored entries with an empty host) rather than NULL (asking to match _any_ host). - when we build a cert:// credential by hand, similarly assign an empty string It's the latter that is more likely to impact real users in practice, since it's what's used for http connections. But we don't have good infrastructure to test it. The url-parsing version will help anybody using git-credential in a script, and is easy to test. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
1 parent 73aafe9
File | Mode | Size |
---|---|---|
CONTRIBUTING.md | -rw-r--r-- | 936 bytes |
PULL_REQUEST_TEMPLATE.md | -rw-r--r-- | 411 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...