Skip to content
Permalink
Browse files Browse the repository at this point in the history
Always use IPv6 if a v6 address was given #1420
  • Loading branch information
jcameron committed Dec 28, 2020
1 parent 034da9a commit 1163f3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions miniserv.pl
Expand Up @@ -2603,8 +2603,9 @@ sub handle_request
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 |");
Expand Down
3 changes: 2 additions & 1 deletion status/ping-monitor.pl
Expand Up @@ -10,7 +10,8 @@ sub get_ping_status
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-
Expand Down

1 comment on commit 1163f3a

@OS-WS
Copy link

@OS-WS OS-WS commented on 1163f3a Dec 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the fix for CVE-2020-35769?

Please sign in to comment.