From d94e348f57571c52bd58a5c0ee28ef588aaa5c45 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 18 Feb 2025 08:26:07 +0100 Subject: [PATCH] Use a better random string --- plugins/file-upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }