From: Jakub Vrana Date: Tue, 18 Feb 2025 07:26:07 +0000 (+0100) Subject: Use a better random string X-Git-Tag: v4.16.0~37 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=d94e348f57571c52bd58a5c0ee28ef588aaa5c45;p=adminer.git Use a better random string --- diff --git a/plugins/file-upload.php b/plugins/file-upload.php index af352673..6c40f624 100644 --- a/plugins/file-upload.php +++ b/plugins/file-upload.php @@ -36,7 +36,7 @@ class AdminerFileUpload { return false; } //! 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")) { return false; }