]> asedeno.scripts.mit.edu Git - PuTTY_svn.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)
commit21cc6ccb25afd991a94eff1b8e668cbb66803fb1
tree703b2860dc375a9366c15997bd3ac1729137e23b
parent62a380a7a673d41f032777a54640825a5f8a1a25
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.

git-svn-id: http://svn.tartarus.org/sgt/putty@10121 cda61777-01e9-0310-a592-d414129be87e
ssh.c
unix/uxplink.c
windows/winplink.c