From c4bf44e579178f8628a8d57265fcafc58f59fb22 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 30 Dec 2005 11:09:16 +0000 Subject: [PATCH] - mt_srand in unique_id working properly (swapped usec and sec) - mt_srand in digest_md5 removed git-svn-id: file:///svn/phpbb/trunk@5403 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- phpBB/includes/functions_messenger.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7bc9580c33..64fda22ac8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -139,7 +139,7 @@ function gen_rand_string($num_chars) */ function unique_id($extra = 0) { - list($sec, $usec) = explode(' ', microtime()); + list($usec, $sec) = explode(' ', microtime()); mt_srand((float) $extra + (float) $sec + ((float) $usec * 100000)); return uniqid(mt_rand(), true); } diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index f9ce062d0b..895c6c078b 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1162,7 +1162,6 @@ class smtp_class if (!empty($md5_challenge)) { $str = ''; - mt_srand( (double) microtime() * 10000000); for ($i = 0; $i < 32; $i++) { $str .= chr(mt_rand(0, 255));