Always use IPv6 if a v6 address was given https://github.com/webmin/webmin/issues/1420

This commit is contained in:
Jamie Cameron
2020-12-28 14:03:41 -08:00
parent 034da9aba3
commit 1163f3a7f4
2 changed files with 5 additions and 3 deletions

View File

@@ -2603,8 +2603,9 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) {
if ($on_windows) {
# Run the CGI program, and feed it input
chdir($ENV{"PWD"});
local $qqueryargs = join(" ", map { "\"$_\"" }
split(/\s+/, $queryargs));
local $qqueryargs = join(" ",
map { s/([<>|&"^])/^$1/g; "\"$_\"" }
split(/\s+/, $queryargs));
if ($first =~ /(perl|perl.exe)$/i) {
# On Windows, run with Perl
open(CGIOUTr, "$perl_path \"$full\" $qqueryargs <$infile |");

View File

@@ -10,7 +10,8 @@ local $wait = defined($_[0]->{'wait'}) ? $_[0]->{'wait'} : 5;
local $ip = &to_ipaddress($_[0]->{'host'}) ||
&to_ip6address($_[0]->{'host'});
return { 'up' => 0 } if (!$ip);
local $ipv6 = &to_ip6address($_[0]->{'host'}) &&
local $ipv6 = &check_ip6address($_[0]->{'host'}) ||
&to_ip6address($_[0]->{'host'}) &&
!&to_ipaddress($_[0]->{'host'});
if ($config{'pinger'} || $ipv6) {
# Call a ping command if configured, or if using IPv6 since the built-