From 92cdd4cc7f6955760236e134126d8a68efa13360 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 12 Feb 2020 19:21:35 +0100 Subject: hand-picked changes for better password functions from tyzoids branch --- install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index 979caf9..26fbae6 100644 --- a/install.php +++ b/install.php @@ -9,7 +9,7 @@ // The FluxBB version this script installs define('FORUM_VERSION', '1.5.11'); -define('FORUM_DB_REVISION', 21); +define('FORUM_DB_REVISION', 22); define('FORUM_SI_REVISION', 2); define('FORUM_PARSER_REVISION', 2); @@ -110,7 +110,7 @@ function generate_config_file() { global $db_type, $db_host, $db_name, $db_username, $db_password, $db_prefix, $cookie_name, $cookie_seed; - return 'query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email) VALUES(3, \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\', \''.$db->escape($lang_install['Guest']).'\')') or error('Unable to add guest user. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); - $db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, language, style, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.pun_hash($password1).'\', \''.$email.'\', \''.$db->escape($default_lang).'\', \''.$db->escape($default_style).'\', 1, '.$now.', '.$now.', \''.$db->escape(get_remote_address()).'\', '.$now.')') + $db->query('INSERT INTO '.$db_prefix.'users (group_id, username, password, email, language, style, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, \''.$db->escape($username).'\', \''.$db->escape(pun_password_hash($password1)).'\', \''.$email.'\', \''.$db->escape($default_lang).'\', \''.$db->escape($default_style).'\', 1, '.$now.', '.$now.', \''.$db->escape(get_remote_address()).'\', '.$now.')') or error('Unable to add administrator user. Please check your configuration and try again', __FILE__, __LINE__, $db->error()); // Enable/disable avatars depending on file_uploads setting in PHP configuration -- cgit v1.2.3-54-g00ecf