Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeven Bansod <devenbansod.bits@gmail.com>2016-10-05 09:03:44 +0300
committerDeven Bansod <devenbansod.bits@gmail.com>2016-10-05 09:03:44 +0300
commit889cd31618c86f7f30fcfe5f8e501f94e5e41a3c (patch)
tree94d4a0fb21c9bfe84d013445e9228710dee4bbe3 /prefs_manage.php
parenta7786dd93a5ce1ee6a6026864275bb5b753b87ae (diff)
Prevent leaving an orphaned file while importing preferences
Fix #12362 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
Diffstat (limited to 'prefs_manage.php')
-rw-r--r--prefs_manage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/prefs_manage.php b/prefs_manage.php
index 44964e70de..e17dbba6bc 100644
--- a/prefs_manage.php
+++ b/prefs_manage.php
@@ -62,9 +62,9 @@ if (isset($_POST['submit_export'])
$tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : 'tmp/');
if (@is_writable($tmp_subdir)) {
$import_file_new = tempnam($tmp_subdir, 'prefs');
+ $file_to_unlink = $import_file_new;
if (move_uploaded_file($import_file, $import_file_new)) {
$import_file = $import_file_new;
- $file_to_unlink = $import_file_new;
}
}
}