fix for fixed possible XSS in database name - thanks to Omer Singer, The DigiTrust Group
sorry ... should more test ... ;-)
This commit is contained in:
@@ -345,10 +345,10 @@ require_once './libraries/List.class.php';
|
|||||||
if (count($dbs) > 1) {
|
if (count($dbs) > 1) {
|
||||||
$return .= '<li>' . htmlspecialchars($group) . '<ul>' . "\n";
|
$return .= '<li>' . htmlspecialchars($group) . '<ul>' . "\n";
|
||||||
// wether display db_name cuted by the group part
|
// wether display db_name cuted by the group part
|
||||||
$cut = htmlspecialchars($db['disp_name_cut']);
|
$cut = true;
|
||||||
} else {
|
} else {
|
||||||
// .. or full
|
// .. or full
|
||||||
$cut = htmlspecialchars($db['disp_name']);
|
$cut = false;
|
||||||
}
|
}
|
||||||
foreach ($dbs as $db) {
|
foreach ($dbs as $db) {
|
||||||
$return .= '<li';
|
$return .= '<li';
|
||||||
@@ -361,7 +361,12 @@ require_once './libraries/List.class.php';
|
|||||||
}
|
}
|
||||||
$return .= ' href="index.php?' . PMA_generate_common_url($db['name'])
|
$return .= ' href="index.php?' . PMA_generate_common_url($db['name'])
|
||||||
. '" target="_parent">';
|
. '" target="_parent">';
|
||||||
$return .= $cut .' (' . $db['num_tables'] . ')';
|
if ($cut) {
|
||||||
|
$return .= htmlspecialchars($db['disp_name_cut']);
|
||||||
|
} else {
|
||||||
|
$return .= htmlspecialchars($db['disp_name']);
|
||||||
|
}
|
||||||
|
$return .= ' (' . $db['num_tables'] . ')';
|
||||||
$return .= '</a></li>' . "\n";
|
$return .= '</a></li>' . "\n";
|
||||||
}
|
}
|
||||||
if (count($dbs) > 1) {
|
if (count($dbs) > 1) {
|
||||||
|
Reference in New Issue
Block a user