path disclosure

This commit is contained in:
Marc Delisle
2003-07-19 15:29:53 +00:00
parent 204d9669af
commit 9439bd3780
4 changed files with 18 additions and 9 deletions

View File

@@ -174,9 +174,11 @@ if (isset($do) && $do == 'import') {
// function is_writeable() is valid on PHP3 and 4
if (!is_writeable($tmp_subdir)) {
// if we cannot move the file, let PHP report the error
error_reporting(E_ALL);
$docsql_text = PMA_readFile($sql_file, $sql_file_compression);
if ($docsql_text == FALSE) {
echo $strFileCouldNotBeRead;
exit();
}
}
else {
$sql_file_new = $tmp_subdir . basename($sql_file);