diff options
author | David M <davidmj@users.sourceforge.net> | 2006-12-03 17:36:59 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-12-03 17:36:59 +0000 |
commit | ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f (patch) | |
tree | 8f42fed41f0e463dd60d499674489edce609d072 /phpBB/posting.php | |
parent | 1f7224c6019be5871f8385c6bb4403fd6ea28563 (diff) | |
download | forums-ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f.tar forums-ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f.tar.gz forums-ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f.tar.bz2 forums-ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f.tar.xz forums-ec80eb74aa5874f8790c3435bf4dd9fdf9614c6f.zip |
#5734
- replaced array_rand($array) with mt_rand(0, sizeof($array) - 1) as array_rand did not take my seed
git-svn-id: file:///svn/phpbb/trunk@6705 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index ba32f24626..d991f27b35 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1128,12 +1128,14 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_c // Generate code $code = gen_rand_string(mt_rand(5, 8)); $confirm_id = md5(unique_id($user->ip)); + $seed = hexdec(substr(unique_id(), 4, 10)); $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'confirm_id' => (string) $confirm_id, 'session_id' => (string) $user->session_id, 'confirm_type' => (int) CONFIRM_POST, - 'code' => (string) $code) + 'code' => (string) $code, + 'seed' => (int) $seed) ); $db->sql_query($sql); |