[security] Fixed local file inclusion vulnerability and code execution, see PMASA-2011-11

This commit is contained in:
Herman van Rink
2011-07-08 21:41:05 +02:00
parent 3caa6cbb7e
commit 3ae58f0cd6
3 changed files with 15 additions and 9 deletions

View File

@@ -37,7 +37,9 @@ include_once("./libraries/schema/Export_Relation_Schema.class.php");
* default is PDF
*/
global $db,$export_type;
$export_type = isset($export_type) ? $export_type : 'pdf';
if (!isset($export_type) || !preg_match('/^[a-zA-Z]+$/', $export_type)) {
$export_type = 'pdf';
}
PMA_DBI_select_db($db);
$path = PMA_securePath(ucfirst($export_type));