From: Jamie Cameron Date: Mon, 24 Oct 2011 18:47:31 +0000 (-0700) Subject: Handle hostnames with upper-case letters X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=webmin.git;a=commitdiff_plain;h=HEAD Handle hostnames with upper-case letters https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3427834&group_id=17457 --- diff --git a/ldap-client/ldap-client-lib.pl b/ldap-client/ldap-client-lib.pl index fac85fe9..97370df7 100755 --- a/ldap-client/ldap-client-lib.pl +++ b/ldap-client/ldap-client-lib.pl @@ -231,7 +231,7 @@ if ($ldap_hosts) { elsif ($uri) { # Using uri directive foreach my $u (split(/\s+/, $uri)) { - if ($u =~ /^(ldap|ldaps|ldapi):\/\/([a-z0-9\_\-\.]+)(:(\d+))?/) { + if ($u =~ /^(ldap|ldaps|ldapi):\/\/([a-z0-9\_\-\.]+)(:(\d+))?/i) { ($proto, $host, $port) = ($1, $2, $4); if (!$port && $proto eq "ldap") { $port = 389;