This removes the classical XSS vulnerability of using unquoted
PHP_SELF.
Reported-by: John Lightsey <john@nixnuts.net>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
$querystr = htmlspecialchars($query, ENT_QUOTES, 'UTF-8');
?>
-<form action="<?php echo $_SERVER['PHP_SELF'], "?query=", rawurlencode($query) ?>"
+<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), "?query=", rawurlencode($query) ?>"
enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="50" value="<?php echo $querystr ?>"/>
<select name="scope">