Fixed issue with listing the domain without 'domain' parameter

This commit is contained in:
2019-08-05 21:29:09 +02:00
parent 4e9ea3dd18
commit acf4bc9979

View File

@@ -417,7 +417,7 @@ foreach my $d (@DNSDomain) {
if ($d <0) { $d = join('.', splice(@{[ split(/\./, $cgi->virtual_host) ]}, $d)); }
else { $d = join('.', splice(@{[ split(/\./, $host) ]}, ($d) ? -$d : 1)); }
}
$dnsdomain = $d if ($host && length($host) == length($d)+rindex($host,$d));
$dnsdomain = $d if (!$host || length($host) == length($d)+rindex($host,$d));
last if $dnsdomain;
}
fail($PE, "No host name to act on specified", 400)