mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-11 01:55:24 +02:00
- 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
This commit is contained in:
parent
a63687d13f
commit
c4bf44e579
@ -139,7 +139,7 @@ function gen_rand_string($num_chars)
|
|||||||
*/
|
*/
|
||||||
function unique_id($extra = 0)
|
function unique_id($extra = 0)
|
||||||
{
|
{
|
||||||
list($sec, $usec) = explode(' ', microtime());
|
list($usec, $sec) = explode(' ', microtime());
|
||||||
mt_srand((float) $extra + (float) $sec + ((float) $usec * 100000));
|
mt_srand((float) $extra + (float) $sec + ((float) $usec * 100000));
|
||||||
return uniqid(mt_rand(), true);
|
return uniqid(mt_rand(), true);
|
||||||
}
|
}
|
||||||
|
@ -1162,7 +1162,6 @@ class smtp_class
|
|||||||
if (!empty($md5_challenge))
|
if (!empty($md5_challenge))
|
||||||
{
|
{
|
||||||
$str = '';
|
$str = '';
|
||||||
mt_srand( (double) microtime() * 10000000);
|
|
||||||
for ($i = 0; $i < 32; $i++)
|
for ($i = 0; $i < 32; $i++)
|
||||||
{
|
{
|
||||||
$str .= chr(mt_rand(0, 255));
|
$str .= chr(mt_rand(0, 255));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user