]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
fix cross site scripting 226/head
authorrekter0 <58881147+rekter0@users.noreply.github.com>
Mon, 7 Nov 2022 14:12:03 +0000 (15:12 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Nov 2022 14:12:03 +0000 (15:12 +0100)
xss due to printing response from Net::XWhois without proper checks

wwwroot/cgi-bin/plugins/hostinfo.pm

index 95b2c20b7b911b19369dff6ed4e433e96a90eaa5..1f0ac699459d277ed2409075661bd4ae592368ff 100644 (file)
@@ -181,7 +181,7 @@ sub BuildFullHTMLOutput_hostinfo {
 
        &tab_head("Full Whois Field",0,0,'whois');
        if ($w && $w->response()) {
-               print "<tr><td class=\"aws\"><pre>".($w->response())."</pre></td></tr>\n";
+               print "<tr><td class=\"aws\"><pre>".CleanXSS($w->response())."</pre></td></tr>\n";
        }
        else {
                print "<tr><td><br />The Whois command failed.<br />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) ?<br /><br /></td></tr>\n";