]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Avoid misidentifying unbracketed IPv6 literals as host:port.
authorSimon Tatham <anakin@pobox.com>
Sat, 25 Jan 2014 15:58:57 +0000 (15:58 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 25 Jan 2014 15:58:57 +0000 (15:58 +0000)
commit2b70f39061303796261dea3455964a888fbd1016
tree703b2860dc375a9366c15997bd3ac1729137e23b
parent8da4fa506389910599c59b87ba1b799efd6d3ae1
Avoid misidentifying unbracketed IPv6 literals as host:port.

Both GUI PuTTY front ends have a piece of logic whereby a string is
interpreted as host:port if there's _one_ colon in it, but if there's
more than one colon then it's assumed to be an IPv6 literal with no
trailing port number. This permits the PuTTY command line to take
strings such as 'host', 'host:22' or '[::1]:22', but also cope with a
bare v6 literal such as '::1'.

This logic is also required in the two Plink front ends and in the
processing of CONF_loghost for host key indexing in ssh.c, but was
missing in all those places. Add it.

[originally from svn r10121]
ssh.c
unix/uxplink.c
windows/winplink.c