提交 f27dd534 编写于 作者: M Martin Kletzander

docs: Properly quote self uri in search.php

This removes the classical XSS vulnerability of using unquoted
PHP_SELF.
Reported-by: NJohn Lightsey <john@nixnuts.net>
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 ccac4465
......@@ -12,7 +12,7 @@
$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">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册