mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
docs: Properly quote self uri in search.php
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>
This commit is contained in:
parent
ccac446545
commit
f27dd53402
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user