diff --git a/ChangeLog b/ChangeLog index a015f20880..e2407a4a2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog - bug #4568 Date displayed incorrectly when charting a timeline - bug #4571 Database Privileges link does not work - bug makegrid.js: where_clause is undefined +- bug #4572 missing trailing slash (import and open_basedir) 4.2.10.1 (2014-10-21) - bug #4562 [security] XSS in debug SQL output diff --git a/import.php b/import.php index 56a584aa11..7cf03f02cf 100644 --- a/import.php +++ b/import.php @@ -373,19 +373,14 @@ if ($import_file != 'none' && ! $error) { // before opening it. if (! empty($open_basedir)) { - - /** - * @todo make use of the config's temp dir with fallback to the - * system's tmp dir - */ $tmp_subdir = ini_get('upload_tmp_dir'); if (empty($tmp_subdir)) { $tmp_subdir = sys_get_temp_dir(); } - + $tmp_subdir = rtrim($tmp_subdir, DIRECTORY_SEPARATOR); if (is_writable($tmp_subdir)) { - - $import_file_new = $tmp_subdir . basename($import_file) . uniqid(); + $import_file_new = $tmp_subdir . DIRECTORY_SEPARATOR + . basename($import_file) . uniqid(); if (move_uploaded_file($import_file, $import_file_new)) { $import_file = $import_file_new; $file_to_unlink = $import_file_new;