mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Some changes to deal with a potential problem the new random number generator code has with mysql5
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5777 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1e06023aad
commit
541b344ba1
3 changed files with 3 additions and 3 deletions
|
@ -168,7 +168,7 @@ function dss_rand()
|
||||||
$dss_seeded = true;
|
$dss_seeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return substr($val, 16);
|
return substr($val, 4, 16);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced.
|
// Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced.
|
||||||
|
|
|
@ -991,7 +991,7 @@ else
|
||||||
// Generate the required confirmation code
|
// Generate the required confirmation code
|
||||||
// NB 0 (zero) could get confused with O (the letter) so we make change it
|
// NB 0 (zero) could get confused with O (the letter) so we make change it
|
||||||
$code = dss_rand();
|
$code = dss_rand();
|
||||||
$code = strtoupper(str_replace('0', 'o', substr($code, 6)));
|
$code = strtoupper(str_replace('0', 'o', substr($code, 2, 6)));
|
||||||
|
|
||||||
$confirm_id = md5(uniqid($user_ip));
|
$confirm_id = md5(uniqid($user_ip));
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ function gen_rand_string($hash)
|
||||||
{
|
{
|
||||||
$rand_str = dss_rand();
|
$rand_str = dss_rand();
|
||||||
|
|
||||||
return ( $hash ) ? md5($rand_str) : substr($rand_str, 8);
|
return ( $hash ) ? md5($rand_str) : substr($rand_str, 0, 8);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// End page specific functions
|
// End page specific functions
|
||||||
|
|
Loading…
Add table
Reference in a new issue