security fix

This commit is contained in:
Marc Delisle
2005-10-21 01:41:31 +00:00
parent 0a3c8dc40b
commit 429b629125
2 changed files with 7 additions and 0 deletions

View File

@@ -134,6 +134,8 @@ foreach ($dblist AS $current_db) {
// avoids 'undefined index' errors
if (empty($sort_by)) {
$sort_by = 'db_name';
} else {
$sort_by = PMA_sanitize($sort_by);
}
if (empty($sort_order)) {
if ($sort_by == 'db_name') {
@@ -141,6 +143,8 @@ if (empty($sort_order)) {
} else {
$sort_order = 'desc';
}
} else {
$sort_order = PMA_sanitize($sort_order);
}
// sorts the array