mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
Avoid XSS vulnerability on the search engine
Raised by https://www.xssposed.org/incidents/69566/ Need to escape the user provided query before displaying it back
This commit is contained in:
parent
2854079496
commit
d51876bc8e
@ -13,7 +13,7 @@
|
||||
|
||||
<form action="<?php echo $_SERVER['PHP_SELF'], "?query=", rawurlencode($query) ?>"
|
||||
enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="50" value="<?php echo $query?>"/>
|
||||
<input name="query" type="text" size="50" value="<?php echo htmlspecialchars($query, ENT_QUOTES, 'UTF-8')?>"/>
|
||||
<select name="scope">
|
||||
<option value="any">Search All</option>
|
||||
<option value="API" <?php if ($scope == 'API') print "selected='selected'"?>>Only the APIs</option>
|
||||
|
Loading…
x
Reference in New Issue
Block a user