1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00
git-svn-id: file:///svn/phpbb/trunk@7684 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof
2007-05-26 12:44:17 +00:00
parent ffb1366af8
commit 62be0ed93a
2 changed files with 9 additions and 5 deletions

View File

@@ -1359,7 +1359,10 @@ class install_install extends module
// We set a (semi-)unique cookie name to bypass login issues related to the cookie name.
$cookie_name = 'phpbb3_';
$cookie_name .= strtolower(gen_rand_string(5));
$rand_str = md5(mt_rand());
$rand_str = str_replace('0', 'z', base_convert($rand_str, 16, 35));
$rand_str = substr($rand_str, 0, 5);
$cookie_name .= strtolower($rand_str);
$sql_ary[] = 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($cookie_name) . "'