From: Tim Düsterhus Date: Wed, 22 Sep 2021 10:33:58 +0000 (+0200) Subject: Clean up `$prefix` generation in install.php X-Git-Tag: 5.5.0_Alpha_1~422 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18e4898035d2bd09e9325f5c51c15ad24c96225e;p=GitHub%2FWoltLab%2FWCF.git Clean up `$prefix` generation in install.php --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 305dc5caaf..def1312747 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -1203,7 +1203,7 @@ if (isset($_REQUEST['tmpFilePrefix'])) { $prefix = preg_replace('/[^a-f0-9_]+/', '', $_REQUEST['tmpFilePrefix']); } else { - $prefix = substr(sha1(uniqid(microtime())), 0, 8); + $prefix = \bin2hex(\random_bytes(4)); } define('TMP_FILE_PREFIX', $prefix);