Use bound parameters for every query that takes user data.
The queue image query took $id without quotes or a check, which allowed SQL injection.
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@ function sort_options($link) {
|
||||
} else {
|
||||
$href = '<a href="'.$link.'?sort='.$sort_key.'&order='.$order_key;
|
||||
if (isset($_GET['queue'])) $href .= '&queue='.$_GET['queue'];
|
||||
if (isset($_GET['search'])) $href .= '&search='.$search;
|
||||
if (isset($_GET['search'])) $href .= '&search='.urlencode((string)$search);
|
||||
if (isset($_GET['start'])) $href .= '&start='.$start;
|
||||
if (isset($_GET['show'])) $href .= '&show='.$show;
|
||||
$href .= '">'.$display.'</a>';
|
||||
@@ -71,7 +71,7 @@ function get_pager() {
|
||||
if ($start > 0) {
|
||||
$string .= "\n".'<a href="'.$link.'?start='.$next;
|
||||
if (isset($_GET['queue'])) $string .= '&queue='.$queue_url;
|
||||
if (isset($_GET['search'])) $string .= '&search='.$search;
|
||||
if (isset($_GET['search'])) $string .= '&search='.urlencode((string)$search);
|
||||
if (isset($_GET['show'])) $string .= '&show='.$show;
|
||||
if (isset($_GET['sort'])) $string .= '&sort='.$sort;
|
||||
if (isset($_GET['order'])) $string .= '&order='.$order;
|
||||
@@ -85,7 +85,7 @@ function get_pager() {
|
||||
if ($prev < get_count()) {
|
||||
$string .= "\n".'<a href="'.$link.'?start='.$prev;
|
||||
if (isset($_GET['queue'])) $string .= '&queue='.$queue_url;
|
||||
if (isset($_GET['search'])) $string .= '&search='.$search;
|
||||
if (isset($_GET['search'])) $string .= '&search='.urlencode((string)$search);
|
||||
if (isset($_GET['show'])) $string .= '&show='.$show;
|
||||
if (isset($_GET['sort'])) $string .= '&sort='.$sort;
|
||||
if (isset($_GET['order'])) $string .= '&order='.$order;
|
||||
|
||||
Reference in New Issue
Block a user