* Handle hostnames containing % properly

This is for Debian bug  543368.  Thanks to Tony Mancill for the patch
This commit is contained in:
Duncan Ferguson 2009-12-21 18:53:29 +00:00
parent 2aae6cd0e4
commit 4079c83d20
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.29
* Handle hostnames containing % properly (Debian bug 543368)
- Thanks to Tony Mancill for the patch
2009-12-19 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.28
* Look for usernames when adding clusters

View file

@ -963,7 +963,7 @@ sub split_hostname {
# check for correct syntax of using [<IPv6 address>]
# See http://tools.ietf.org/html/rfc2732 for more details
if ( $connect_string =~ m/^\[([\w:]+)\](?::(\d+))?$/xsm ) {
if ( $connect_string =~ m/^\[([\w:%]+)\](?::(\d+))?$/xsm ) {
logmsg( 3, 'connect_string contains IPv6 address' );
$server = $1;
$port = $2;
@ -1001,7 +1001,7 @@ sub split_hostname {
# method will warn if it cannot connect anyhow
# However, this also catchs IPv4 addresses, possibly with ports
( $server, $port )
= $connect_string =~ m/^([\w.-]+)(?::(\d+))?$/xsm;
= $connect_string =~ m/^([\w%.-]+)(?::(\d+))?$/xsm;
}
}
}