Code

Translate hostnames to ip-addresses if possible.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 12 Mar 2009 11:16:56 +0000 (11:16 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 12 Mar 2009 11:16:56 +0000 (11:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13538 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-si/gosa-si-server

index d13b4212d51357cd98b92a388f633224541a5293..85fd54d8ca29d65363ac975240e8eb0baa4028b6 100755 (executable)
@@ -610,7 +610,7 @@ sub check_outgoing_xml_validity {
         }
 
                                # Check if source contains hostname instead of ip address
-                               if(not $source =~ /^[a-z0-9\.]+:\d+$/i) {
+                               if($source =~ /^[a-z][a-z0-9\.]+:\d+$/i) {
                                                my ($hostname,$port) = split(/:/, $source);
                                                my $ip_address = inet_ntoa(scalar gethostbyname($hostname));
                                                if(defined($ip_address) && $ip_address =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ && $port =~ /^\d+$/) {