From: rekter0 <58881147+rekter0@users.noreply.github.com> Date: Mon, 7 Nov 2022 14:12:03 +0000 (+0100) Subject: fix cross site scripting X-Git-Tag: AWSTATS_7_9~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F226%2Fhead;p=thirdparty%2FAWStats.git fix cross site scripting xss due to printing response from Net::XWhois without proper checks --- diff --git a/wwwroot/cgi-bin/plugins/hostinfo.pm b/wwwroot/cgi-bin/plugins/hostinfo.pm index 95b2c20b..1f0ac699 100644 --- a/wwwroot/cgi-bin/plugins/hostinfo.pm +++ b/wwwroot/cgi-bin/plugins/hostinfo.pm @@ -181,7 +181,7 @@ sub BuildFullHTMLOutput_hostinfo { &tab_head("Full Whois Field",0,0,'whois'); if ($w && $w->response()) { - print "
".($w->response())."
\n"; + print "
".CleanXSS($w->response())."
\n"; } else { print "
The Whois command failed.
Did the server running AWStats is allowed to send WhoIs queries (If a firewall is running, port 43 should be opened from inside to outside) ?

\n";