aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-03-17 23:01:07 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-03-17 23:07:35 +0100
commit48ba841be0abf6b44211826101334d1dafb93dd2 (patch)
tree75feb12a4196ff7944d577f123f291cc111f3327 /phpBB/includes
parent784132d7e870e59b9cfa2b7cce4828d817270867 (diff)
downloadforums-48ba841be0abf6b44211826101334d1dafb93dd2.tar
forums-48ba841be0abf6b44211826101334d1dafb93dd2.tar.gz
forums-48ba841be0abf6b44211826101334d1dafb93dd2.tar.bz2
forums-48ba841be0abf6b44211826101334d1dafb93dd2.tar.xz
forums-48ba841be0abf6b44211826101334d1dafb93dd2.zip
[ticket/10100] Update rand_seed_last_update before rand_seed in unique_id().
Update $config['rand_seed_last_update'] before updating $config['rand_seed'] in unique_id() to mitigate a race condition and unnecessary updates on heavily busy boards. PHPBB3-10100
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 2fc7ca6903..198e429afc 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -240,8 +240,8 @@ function unique_id($extra = 'c')
if ($dss_seeded !== true && ($config['rand_seed_last_update'] < time() - rand(1,10)))
{
- set_config('rand_seed', $config['rand_seed'], true);
set_config('rand_seed_last_update', time(), true);
+ set_config('rand_seed', $config['rand_seed'], true);
$dss_seeded = true;
}