1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Use a better random string

This commit is contained in:
Jakub Vrana
2025-02-18 08:26:07 +01:00
parent 51dbfb6987
commit d94e348f57

View File

@@ -36,7 +36,7 @@ class AdminerFileUpload {
return false; return false;
} }
//! unlink old //! unlink old
$filename = uniqid() . $regs2[0]; $filename = (function_exists('random_bytes') ? bin2hex(random_bytes(8)) : uniqid("", true)) . $regs2[0];
if (!move_uploaded_file($_FILES[$name]["tmp_name"], "$this->uploadPath$table/$regs[1]-$filename")) { if (!move_uploaded_file($_FILES[$name]["tmp_name"], "$this->uploadPath$table/$regs[1]-$filename")) {
return false; return false;
} }