From b701db93e07fa839cf599577b45ccf3ff7b71351 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Mon, 23 Mar 2009 16:54:20 -0400 Subject: [PATCH] add FIXME note about IPv6 addresses, and break out hostnames from the last colon, not the first. --- src/share/common | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/share/common b/src/share/common index 5a11817..d6e4949 100644 --- a/src/share/common +++ b/src/share/common @@ -467,7 +467,11 @@ ssh2known_hosts() { local port local key - host=${1%%:*} + # FIXME this does not properly deal with IPv6 hosts using the + # standard port (because it's unclear whether their final + # colon-delimited address section is a port number or an address + # string) + host=${1%:*} port=${1##*:} key="$2" -- 2.26.2